wappy
Sep 27 2006, 02:16 AM
Hi i have made a stupid error on one of my pages and having trouble finding it. It says unexpected ')' on line 114 can anyone please help me find it? Here is the page: CODE <? /** * * @package TibiaME Clan/Download Site * @version 1.00 2006/09/27 00:04:37 wappy * @copyright (c)2004-2006 wappyCULT * @home http://hack.s-60.org * @license You can use/modify this script but distributing it without permisinn, or removing the "Script By: wappy" link will invalidate your license and give wappy (wappyCULT) FULL RIGHTS to request removal of the script from your server * @licensed to Jack The Ripper * @wapsite http://tibia.s-60.org * @thanks to Jon Roig and Sadhu * */ Include ('data/function_dskspace.php'); header("Content-type: text/vnd.wap.wml"); echo "<?xml version=\"1.0\"?>"; echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""." \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; // sadhu's genius 1 line error fix starts $page = $_GET["page"]; // sadhu's genius 1 line error fix ends //items per page $conf["items_per_page"] = 10; //in this put the above amount plus the number of folders in root i have two folders in my root, data and cgi-bin so i put 12 if ($page=="0"){$conf["items_per_page"] = 12;} if (!isset($page)) {$page = 0;} $user = explode ('/', $HTTP_USER_AGENT);
if(!($dp = opendir("./"))) die ("Cannot open ./"); $file_array = array(); while ($file = readdir ($dp)) { if(substr($file,0,1) != '.' and $file != "index.php") { $file_array[] = $file; } } $file_count = count ($file_array); sort ($file_array); ?> <wml> <card id="card1" title="TIBIA CLAN"> <p align ="center" mode="nowrap"> <img src="tibiame_small_logo.jpg" alt="TIBIA CLAN"/></p><p align ="left" mode="nowrap"> <? if ($file_count=="0"){echo "<small>Sorry there are $file_count files in this folder!</small>";} if ($file_count > 0) { $first_record = $page * $conf["items_per_page"]; $last_record = $first_record + $conf["items_per_page"]; while (list($fileIndexValue, $file_name) = each ($file_array)) {
if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record)) { //icon code $icon = "data/unknown.gif"; $rev = strrev ($file_name); $exp = explode (".", $rev); $true = strrev ($exp[0]); $trueext = strtolower ($true); if ($trueext=="zip" OR $trueext=="rar" OR $trueext=="gz"){$icon = "data/zip.gif";} if ($trueext=="amr"){$icon = "data/amr.gif";} if ($trueext=="midi"){$icon = "data/midi.gif";} if ($trueext=="mid"){$icon = "data/mid.gif";} if ($trueext=="gif"){$icon = "data/gif.gif";} if ($trueext=="jpeg"){$icon = "data/jpeg.gif";} if ($trueext=="jpg"){$icon = "data/jpg.gif";} if ($trueext=="jad"){$icon = "data/jad.gif";} if ($trueext=="jar"){$icon = "data/jar.gif";} if ($trueext=="sis"){$icon = "data/sis.gif";} if ($trueext=="bmp"){$icon = "data/bmp.gif";} if ($trueext=="wbmp"){$icon = "data/wbmp.gif";} if ($trueext=="txt"){$icon = "data/txt.gif";} if ($trueext=="avi"){$icon = "data/avi.gif";} if ($trueext=="thm"){$icon = "data/thm.gif";} if ($trueext=="nth"){$icon = "data/nth.gif";} if ($trueext=="png"){$icon = "data/png.gif";} if ($trueext=="mmf"){$icon = "data/mp4.gif";} if ($trueext=="wav"){$icon = "data/wav.gif";} if (is_dir($file_name)){$show="no";}else{$show="yes";} if ($show=="yes"){ //show file links $kb="kb"; //get rid of ext $linkname = str_replace ($trueext, "", $file_name);
$number=($fileIndexValue+1); $size = round(filesize($file_name)/1024,1); echo "<small><a href=\"$file_name\"><img src=\"$icon\" alt=\"$number\"/>$linkname ($size$kb)</a></small><br/>";} $total = $total + filesize($file_name); }
} ?> </p><p align ="center" mode="nowrap"> <? $pages =(int) ceil($file_count / $conf["items_per_page"]); $pages = ($pages -1); if ($pages>0){ echo "<br/>";} if (($file_count > 0) AND ($page != 0)) { // previous button $prev_page = $page -1; echo "<small><a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page\">«Prev</a></small>"; } if (($file_count > 0) AND ($last_record < $file_count)) { // next button $next_page = $page + 1; if ($page=="0"){$break="";}else{$break="|";} echo "$break<small><a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page&sid=$sid\">Next»</a></small>"; } if ($page>$pages){echo "<br/><small><br/>This page does not exist!</small>";}
//page display on site $pagedisplay = $page; if ($pagedisplay=="0"){$pagedisplay="Home";} if ($pagedisplay==$pages){$pagedisplay="Last";}
//space code $space = dskspace ('./'); $space = round ($space/1024000,1); $total = round ($total/1024000,1); $mb = "mb";
if($pages>2){echo "<small><br/><br/>Page ($pagedisplay|$total$mb)<br/><br/>Jump (0-$pages):</small><br/>";} if($pages>2)print "<input emptyok=\"true\" name=\"jump\" format=\"*N\" size=\"3\" value=\"\" /><small><a href=\"".$_SERVER["PHP_SELF"]."?page=$(jump)\">[Go]</a></small>"; if ($page<$pages){echo "<br/><small><a href=\"".$_SERVER["PHP_SELF"]."?page=$pages\">Last Page</a></small>";} if ($page=="0" AND $file_count>10){echo "<br/>";} if ($page>0){echo "<br/><small><a href=\"".$_SERVER["PHP_SELF"]."?page=0\">Home</a><br/></small>";}
echo "<small><br/>$file_count </small>";
echo "<small>Files ($space$mb)<br/></small>";
echo "<br/><small>Script By: <a href=\"http://hack.s-60.org\">wappy</a><br/><u>tibia.</u><a href=\"http://hack.s-60.org\">hack.s-60.org</a></small>";
}
closedir($dp);
echo "<small><br/>©2006 Jack The Ripper</small>";
?>
</p> </card> </wml>

Reply
jlhaslip
Sep 27 2006, 02:26 AM
which is line 114 and is it a php error?
Reply
wappy
Sep 27 2006, 02:38 AM
yes its a php syntax error. I don't know what is line 140 this is one of the reasons im asking for help. It says unexpected ')' on line 114.
Reply
Saint_Michael
Sep 27 2006, 07:25 AM
CODE if ($pagedisplay==$pages){$pagedisplay="Last";}
thats your line 114 try this to see if it works. CODE if {$pagedisplay==$pages}{$pagedisplay="Last";}
Reply
jlhaslip
Sep 27 2006, 08:13 AM
QUOTE $pages =(int) ceil($file_count / $conf["items_per_page"]); This line may be the source of the problem. The intval function is defined on the php.org site. There is no int() in php that I can find. It appears that you are trying to use (int) instead of the correct function and the parser may be getting confused about matching the braces/brackets/what_ever_they_are_called. try using: CODE $pages = intval( ceil($file_count / $conf["items_per_page"]);
*edit* Dang, that php manual is big. Type casting is what you were doing. I see that now. Anyway, I'll try again... (might want to try my suggestion anyway, in case it works??? It should perform the same task as the type casting.) QUOTE(php manual) To explicitly convert a value to integer, use either the (int) or the (integer) cast. However, in most cases you do not need to use the cast, since a value will be automatically converted if an operator, function or control structure requires an integer argument. You can also convert a value to integer with the function intval().
Reply
wappy
Sep 27 2006, 09:06 AM
mmm no.. Look i literally just made a simple typo.. Like i pressed delete on something or missed a ; or a " or something?? All that stuff said above is very confusing. It works fine and is just a typo i done it while i was tired and changing layout. Sigh.. Lol ___ don't know if this will help anyone find the error but here is an older version of the page that im using older working version and here is the working page. Ignore the square symbols they are enters, this might help show what is NOT the error for elimination: CODE <? /** * * @package tibia clan site * @version 1.00 2006/09/12 21:53:27 JACK THE RIPPER * @copyright (c)2006 JACK THE RIPPER * @license FREE * @wapsite http://hack.s-60.org * */
/** */ Include ('data/function_dskspace.php'); header("Content-type: text/vnd.wap.wml"); echo "<?xml version=\"1.0\"?>"; echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""." \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; $page = $_GET["page"]; $conf["items_per_page"] = 10; if (!isset($page)) {$page = 0;} $user = explode ('/', $HTTP_USER_AGENT);
if(!($dp = opendir("./"))) die ("Cannot open ./"); $file_array = array(); while ($file = readdir ($dp)) { if(substr($file,0,1) != '.' and $file != "index.php") { $file_array[] = $file; } } $file_count = count ($file_array); sort ($file_array); ?> <wml> <card id="card1" title="TIBIA CLAN"> <p align ="center" mode="nowrap"> <img src="tibiame_small_logo.jpg" alt="TIBIA CLAN"/><br/>---</p><p align ="left" mode="nowrap"> <? if ($file_count=="0"){echo "<small>Sorry there are $file_count files in this folder!</small>";} if ($file_count > 0) { $first_record = $page * $conf["items_per_page"]; $last_record = $first_record + $conf["items_per_page"]; while (list($fileIndexValue, $file_name) = each ($file_array)) {
if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record)) { //icon code $icon = "data/unknown.gif"; $rev = strrev ($file_name); $exp = explode (".", $rev); $true = strrev ($exp[0]); $trueext = strtolower ($true); if ($trueext=="zip" OR $trueext=="rar" OR $trueext=="gz"){$icon = "data/zip.gif";} if ($trueext=="amr"){$icon = "data/amr.gif";} if ($trueext=="midi"){$icon = "data/midi.gif";} if ($trueext=="mid"){$icon = "data/mid.gif";} if ($trueext=="gif"){$icon = "data/gif.gif";} if ($trueext=="jpeg"){$icon = "data/jpeg.gif";} if ($trueext=="jpg"){$icon = "data/jpg.gif";} if ($trueext=="jad"){$icon = "data/jad.gif";} if ($trueext=="jar"){$icon = "data/jar.gif";} if ($trueext=="sis"){$icon = "data/sis.gif";} if ($trueext=="bmp"){$icon = "data/bmp.gif";} if ($trueext=="wbmp"){$icon = "data/wbmp.gif";} if ($trueext=="txt"){$icon = "data/txt.gif";} if ($trueext=="avi"){$icon = "data/avi.gif";} if ($trueext=="thm"){$icon = "data/thm.gif";} if ($trueext=="nth"){$icon = "data/nth.gif";} if ($trueext=="png"){$icon = "data/png.gif";} if ($trueext=="mmf"){$icon = "data/mp4.gif";} if ($trueext=="wav"){$icon = "data/wav.gif";} if (is_dir($file_name)){$show="no";}else{$show="yes";} if ($show=="yes"){ //show file links $kb="kb"; $number=($fileIndexValue+1); $size = round(filesize($file_name)/1024,1); echo "<small><a href=\"$file_name\"><img src=\"$icon\" alt=\"$number\"/>$file_name ($size$kb)</a></small><br/>";} $total = $total + filesize($file_name); }
} ?> </p><p align ="center" mode="nowrap"> <?
$pages =(int) ceil($file_count / $conf["items_per_page"]); $pages = ($pages -1); if ($pages>0){ echo "<small>---</small><br/>";} if (($file_count > 0) AND ($page != 0)) { // previous button $prev_page = $page -1; echo "<small><a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page\">«Prev</a></small>"; } if (($file_count > 0) AND ($last_record < $file_count)) { // next button $next_page = $page + 1; echo "|<small><a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page&sid=$sid\">Next»</a></small>"; }
if ($page>$pages){echo "<br/><small>---<br/>This page does not exist!</small>";} if($pages>1){echo "<small><br/>---<br/>Jump (0-$pages/$page):</small><br/>";} if($pages>1)echo "<input emptyok=\"true\" name=\"jump\" format=\"*N\" size=\"3\" value=\"\" /><small><a href=\"".$_SERVER["PHP_SELF"]."?page=$(jump)&sid=$sid\">[Go]</a></small>"; if ($page<$pages){echo "<br/><small><a href=\"".$_SERVER["PHP_SELF"]."?page=$pages&sid=$sid\">Last page</a></small>";} if ($page=="0" AND $file_count>10){echo "<br/>";} if ($page>0){echo "<br/><small><a href=\"".$_SERVER["PHP_SELF"]."?page=0&sid=$sid\">First page</a></small>";}
echo "<small><br/>$file_count </small>";
$space = dskspace ('./'); $space = round ($space/1024000,1); $mb = "mb"; echo "<small>files</small>";
//find true path of this site $docname = "" . $_SERVER [ 'SERVER_NAME' ] . $_SERVER [ 'PHP_SELF' ]; $path = dirname($docname); $path = str_replace ("www.", "", $path);
echo "<br/><small>$path</small>";
}
closedir($dp);
echo "<small><br/>©2006 JACK THE RIPPER</small>";
?> </p> </card> </wml>
Reply
electron
Sep 29 2006, 01:49 PM
Well (int) is not a function. If you place this before anything PHP will convert it to an integer even though it is a string .But it must be numeric. Non numeric characters will make it value to Zero. It is very useful for forms using GET/POST and fields whose values are to be integers. You can also convert a integer to a string by ptting before the VARIABLE (string).
Reply
wappy
Sep 29 2006, 02:54 PM
but what has this got to do with the error!? Its not that causing the error i have used it for ages. Grrr forget it.. IT IS NOTHING TO DO WITH INT CAUSING THE ERROR WHY WON'T ANYONE LISTEN. I wish i hadn't posted now sigh..
Reply
BuffaloHELP
Sep 30 2006, 10:04 AM
On lines 16 and 17, are you sure you have those quotes used correctly? Try using this way CODE echo "<?xml version=\'1.0\'?>"; echo "<!DOCTYPE wml PUBLIC \'-//WAPFORUM//DTD WML 1.1//EN\\'http://www.wapforum.org/DTD/wml_1.1.xml\'>"; That got rid of most of my errors. But since I don't have those files it requests for I cannot test it further. And line 45 and 93 it should be CODE <?PHP When you need to switch from PHP script to HTML script you can use PRINT or ECHO rather than going in and out of PHP. It looks like some of IF conditions are redundant at some point. But it's WAP related so I guess it could be correct.
Reply
Recent Queries:--
nth to thm converter - 8.92 hr back. (1)
-
convert nth file to thm file - 10.58 hr back. (2)
-
convert .thm to .nth - 16.84 hr back. (1)
-
thm convert to nth file nth converter - 66.84 hr back. (1)
-
convert nth file to thm - 108.64 hr back. (1)
-
invalid php_self path phpmyadmin - 113.20 hr back. (1)
Similar Topics
Keywords : needed, silly, error
- Mysql Error
(3)
Tutorial Needed?!
PHP+Ajax (11) I need many tutorials based on PHP programming language and AJAX technology. Those tutorials might
be of any kind. Please post only the links to the trusted and working tutorials!....
Admin Page
Tutorial Needed? (4) I need to look at a nice tutorial how do you create an admin access page with many functions as many
as possible.....
Tools Needed!
PHP & MySQL (9) Hello, everyone! I need some tools for those two things to test PHP scripts coming together with
database on my laptop, instead checking them on a web-server which takes time.....
Php Code Needed Iii
(10) Hello, everyone. I need your help again! Who might create the PHP code, the picture is
above this text. Basically, I want when the user fill in all the information in this form, it
automatically was sent to my email. And, then, the dialog box appears or on the same window, it was
said that your request has been sent. Moreover, if the user did not fill the entire information,
the dialog box appears stating that you did not fill some field. Thanks, for help. You always do
that.....
Looking For Command Line Based Sql Modification
Program Needed For SQL? (1) How I use Windows command prompt client and do modifications to my SQL database. If yes, please
write the commads I should know for that. If no, please get me the software with which I can do it.
Topic title modified. Proper English is always required when posting in our forum. ....
Php Code Needed
Working Together? (5) Hello, everyone. I need your help again. This forum is quite good for it. Well, I need create a
registration form for my web-site using PHP and SQL. The information it should contain: 1) User
Name 2) First Name 3) Last Name 4) Password 5) e-mail Address 6) Security Image: that images helps
to protect a random registration, for instance, 56+2=where user have to type an answer in order to
finish registration. That's all for today. Anymore things, I will post another post over here.
....
Php Code
Needed?! (15) Well, I am a novice in PHP programming, so there is a script which I wanna get: 1. You go the
web-site 2. On the main screen, there is a some kind of field windows, the one you get used to type
in, when you go to google, for instance. 3. He or she types her email address and it's going to
be saved in my SQL database. 4. That's it. Help me if you can.....
Slaed Cms
Book Needed!!! (2) Hello, everyone! I need some tutorial for Slaed Engine for any version you might find. I wanna
learn how you can make modules or blocks for this CMS. Especially, library functions and other
things that will make the web-site works like virtual library.....
Php Objects: Catchable Fatal Error
There is a weird problem with objects in php 5.2.2 (4) in php 4.4.7 my code seems to be ok but in later version 5.2.2 i get this error Catchable fatal
error: Object of class mission_rank could not be converted to string in
/Applications/xampp/xamppfiles/htdocs/nexus/includes/forms/cn_reload.php on line 41 cn_reload.php
include('../class/userClass.php'); session_start(); $app_user =&
$_SESSION ; if ($app_user->character != false) { $race_letter =
array('H','E','T','M','G'); $cn_id = 0; foreach
($app_user->character as....
Wamp Packages Needed To Test Scripts
Set up Apache, PHP, etc on your machine (1) In order to test php scripts on your localhost machine, you require a system that includes php
parsing. A WAMP set-up 'usually' includes a database server, and a database manager, too.
For Windows machines, theses are usually referred to as WAMP because they include Apache, Mysql, and
PHP for Windows, hence the acronym WAMP. Wikipedia has a listing of the available packages with
details about the included versions and often a link to the wikipedia article describing them. The
list can be found at http://en.wikipedia.org/wiki/Comparison_of_WAMPs Personally, I....
T_string Error Please Assist
(5) I have unexpected t_strings in 3 lines they are CODE <?php // $Header$ //this
script may only be included - so its better to die if called directly. if
(strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__)) !==
false) { header("location: index.php"); exit; } /* A basic library to
handle a cache of some Tiki Objects, usage is simple and feel free to improve it */ class Cachelib
{ var $folder; function Cachelib() { global $tikidomain;
$th....
Creatting A Playlist Through Php
script help needed (5) Hi I am trying to make a script so that i can insert songs into a playlist, but i need a script in
which it opens the playlist file and removes the closing tag at the end, so before i can add more
entrys. e.g CODE <atx> <entry>Location 5</entry> <entry>Location
4</entry> <entry>Location 3</entry> <entry>Location
2</entry> <entry>Location 1</entry> <atx> But to add more entrys
i would have to get rid of the atx, then use the fputs to place the new entry into the file. ....
Ipetsite Related Programming Help Needed
iPetSite screwed me over (0) Ok so i you are anyone here who would like to hlp me with these files, please pm me your email. Here
is what i need help with: Replacement of lost files Repair of corrupt files Configuring said files
Help with setting up the site If you can help me, please let me know. If you would like to be an
admin on my site, also let me know. Just I request that you don't post here unless you plan or
intend to help some how.....
Phpbb2 Error
recently showing up (4) I tried to install a mod. Did it successfully but didn't like the end result. So I went through
the install backwards and reverted everything back to how they were. Now I am getting this error.
QUOTE Warning: Cannot modify header information - headers already sent by (output started at
/home/damen/public_html/phpBB/language/lang_english/lang_main.php:1034) in
/home/damen/public_html/phpBB/includes/page_header.php on line 483 Warning: Cannot modify header
information - headers already sent by (output started at
/home/damen/public_html/phpBB/language/lang_english....
Php Fsockopen() Error
(14) Hi guys, I've been having problems with PHP and my Apache server, I've got this book (SAMS
PHP, MYSQL and Apache All in One) I've installed all services correctly, but I get an error on
my Radio Homepage saying: QUOTE Warning: fsockopen() : unable to connect to 5.106.1.74:8000 (A
non-blocking socket operation could not be completed immediately. ) in C:\Program
Files\Apache Group\Apache2\htdocs\radio\stats\radio_stats.php on line
13 Riphabbo Radio Is Currently Offline I'm new to PHP and would like to know if th....
Error On Emailer.php & Smtp.php At Phpbb
ERROR on emailer.php & smtp.php at PhpBB (2) Are you use free webhosting??? smtp.php and emailer.php are general error on CMS like phpBB . It
make email verification disabled.Why??? because free webhosting not allow us use smtp port .they
afraid their server will atacking with spam !! so what solution to solve this problem?? You
can search on google or join at phpBB forum !!! but if it can not solve all this problem
it only able 1 trick ..you must download emailer MOD at www.phpbbhacks.com to inactive emailer.php
or smtp.php ....
Error With Joomla Template
cant find function (1) Hello! I am working on my template in Dreamweaver and i am using joomla extensions for
dreamweaver! When i start my page with joomla stand alone server(jsas) i get this errors on the
bottom of the page! QUOTE Warning:
mosloadcomponent(w:/www/Joomla/components/com_banner/banner.php) : failed to open stream: No such
file or directory in w:\www\Joomla\includes\frontend.php on line 66 Warning:
mosloadcomponent(w:/www/Joomla/components/com_banner/banner.php) : failed to open stream: No such
file or directory in w:\www\Joomla....
Php Help Needed Including File In A Page.
(2) i'm a noob in php programming, i can understand and modify php programs, but i dont know to
write on my own. So please somebody who is well versed in php help me. My need is, I'm
currently builiding a knowledge base website , i've my own design for the website, check here,
http://laschatz.info/kzone/ Each page in the left hand site has a tree navigation of all the
topics available. Since this information must be same in all the pages, presently I need to change
all the pages after adding a new category. Could you please help me in such a way that I can ad....
Help Needed With Directory/file Listing Code Infinite Loop
Made an infinite loop but why is this so? (5) Hi all ive got a small and simple (for the moment atleast /unsure.gif"
style="vertical-align:middle" emoid=":unsure:" border="0" alt="unsure.gif" /> )file and directory
listing script in php as follows CODE $dir = "."; $num = 0; $file =
scandir($dir); while($file = scandir($dir)){ echo
$file[$num]; echo "<BR>"; $num = $num + 1;
}; the concept is simple enough, the directory to start with is the current one, so scan this
directory and wh....
Php - Fsockopen, Get, Etc - Help Needed
(1) Hi I am writing a PHP script that gets the search results from here . I can get the results from
the first page fine, but when I try to get the next page, it doesn't return the correct results.
Try comparing the results from here , and searching for "Vampire" (In the "Name" text box) here .
The first page of results is the same, but when you go on the the second page of results, they are
totally different. This I think is because the "persist_search" (see the URI on the Planet Elder
Scrolls Search) always seems invalid. Is there any reason why the PHP would get....
A Very Simple Album Problem, Help Needed.
(3) Hey, I created a page album.php, it shows all the images of a user xxx. and its url is like
album.php?nick=xxx. Now suppose there are 2 images in this user album, one image id is 111 and
second image id is 112.now how i can link to the each image of the album so that it looks like ,
album.php?nick=xxx&image_id=111. and album.php?nick=xxx&image_id=112. I hope you understand it.....
[forum] Double Posting Happening By An Error
(3) Hello, I am currently working on EvilBoard 0.1.1, for those who know about this project versjon 0.1b
can be downloaded from http://www.evilservices.com Well over to the reason why i am posting this,
I am currently experincing a problem with my new posting code wich has been rewrited in version
0.1.1, You see, it is double posting by an error, i thouht i could fix that myself, but no, so i
just thought, Trap17 is perfect, they problety know how to fix this, Here is the code: CODE
<? /* * @Name: Post Topic * @Author: Arne-Christian Blystad * @Copyright&....
Error Importing Sql Query Via Php
Works in PHPmyAdmin (6) CODE function sql() { $fp =
fopen("sql.sql","r"); $sql =
fread($fp,filesize("sql.sql")); fclose($fp);
return $sql; } Thats $this->sql and here is the other source CODE
function insert_sql() { if($_GET['insert']) {
$template = new template; $db = new db;
$db->connect(); $query = $this->sql(); ....
Detect Image Resolution Without Gd
Also stop error if not found (1) Hi, I have come accross some starnge problem in PHP. I wanted to detect the image resolution in
of a URL specified by the user. This is possible via getimagesize() function of PHP that is
independent of GD library. But this function generates a E_WARNING Error if the image is not there.
What shall i do to stop this warning ?? I dont want to show the Error in PHP style but my style of
error reporting. Please help me.....
Uglymonkey Toplist Script
Getting an error with this script, please help. (7) I'm getting an error on the index page.Need help to fix it please. There's the error:
CODE Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource in /home/chatz/public_html/top/index.php on line 10 Failed: delete from
uglymonkey_toplist where lastin < '2006-07-28 18:23:19' and total='0'
Here's the index page that I'm getting the error on: CODE <?php
include("config.php"); if ($purgedays>0){ $purgeseconds =
$purged....
Freetype, Gd And An Error
I just can't get FreeType to work (1) Basically I have this code: CODE header("Content-type: image/png");
$bgimg = "bg.png"; $im = imagecreatefrompng($bgimg); $number =
rand(10,99); $textcolour = imagecolorallocate($im, 255, 255, 255);
$font = "arial.ttf"; imagettftext($im, 65, 0, 5, 95, $textcolour,
$font, $number); imagepng($im); imagedestroy($im);
Unfortunately all I get is the blank placeholder for an image (or the red X if you still use IE)
rathe....
Php Form Help!
Parse error T_LNUMBER - expecting T_VARIABLE (3) Hello, I am trying to make an employee application. I was just wondering if anyone knows how to spot
a php code error, when the code directly around the line with the error looks the same. below is
some of my process.php code. I beleive the error is on line 41. QUOTE PHP parse error: PHP
Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in
/home/wwwange/public_html/FORMS/forms/process.php on line 41 Process.php code: CODE
<?php include("global.inc.php"); $errors=0; $error="The foll....
Show Users Logged In
Some help needed.. (5) I need some help if somebody can help me out please doit /smile.gif" style="vertical-align:middle"
emoid=":)" border="0" alt="smile.gif" />.. Ok here is the thing - I have an login box (works
perfect) and I have MySQL database (works perfect).. Now I need to make thing like a list where
shows everyone who is logged on.. But making it I need to use the same MySQl database and the same
login box.. Example: when your write tour Login and password and press "Log-in!" opens page
where is list of all logged in member.. If there is ant tutorial aor scripts/codes please....
Parse: Error Unexpected T_lnumber
php parse error when running script (4) Hi. I've just created a php script. The main object of the script is to delete some old files
and replace it with a new file with some new content, effectively moving the contents from one file
to another. These are the first 50 lines of the file: /* Calculate For The "A" Group - The
Latest Games ID */ $a_B = 002; while(file_exists("a_" . $a_B . ".dat")) {
$a_B++; } $new_page_contents = " " . $_POST . " " . $_POST . "
include \"/home/cmatcme/public_html/footer.php\"; ?> "; $a_stream = fopen(&....
Looking for needed, silly, error
|
|
Searching Video's for needed, silly, error
|
advertisement
|
|