syntax error (stumped)

From: Date: Fri, 05 Dec 2008 01:32:30 +0000
Subject: syntax error (stumped)
Groups: php.general 
Request: Send a blank email to php-general+get-284125@lists.php.net to get a copy of this message
This is acctualy a very simple code... But I dont know exactly what to do with line 18. It looks to be taking something from dox and redefining it as RES. There is some related code but with syntax is pretty much has to be this one. //Example// <? require "include/bittorrent.php"; dbconn(); if (!$CURUSER) { header("Location: ".$BASEURL); die; } $filename = substr($_SERVER["PATH_INFO"], strrpos($_SERVER["PATH_INFO"], "/") + 1); if (!$filename) stderr( _("Error"), _("Filename missing") ); if (get_user_class() < UC_POWER_USER && filesize("$DOXPATH/$filename") > 1024*1024) stderr( _("Error"), _("Sorry, you need to be a power user or higher to download files larger than 1.00 MB.") ); $filename = sqlesc($filename); $res = do_mysql_query("SELECT * FROM dox WHERE filename=$filename") or sqlerr(); $arr = mysql_fetch_assoc($res); if (!$arr) stderr( _("Error"), _("File Not found")); do_mysql_query("UPDATE LOW_PRIORITY dox SET hits=hits+1 WHERE id=$arr[id]") or sqlerr(); $file = "$DOXPATH/$arr[filename]"; header("Content-Length: " . filesize($file)); header("Content-Type: application/octet-stream"); readfile($file); ?> //end example// this is line 18 : $res = do_mysql_query("SELECT * FROM dox WHERE filename=$filename") or sqlerr(); Any Help would be great.. Im lost here.... Near as I can tell this should be legal.. but I not sure about hows its done. Thanks Sailor -- View this message in context: http://www.nabble.com/syntax-error-%28stumped%29-tp20846197p20846197.html Sent from the PHP - General mailing list archive at Nabble.com.

« previous php.general (#284125) next »