Jump to content

[SOLVED] Unexpected T_Variable error


Capnstank

Recommended Posts

I finished* coding a php page to upload a file onto my web server and insert certain information into a database but when attempting to run it I get an error in my log:

 

[Mon Oct 26 10:16:28 2009] [error] [client 192.168.1.211] PHP Parse error:  syntax error, unexpected T_VARIABLE in /var/www/tracker/upload_file.php on line 86, referer: http://192.168.1.211/form.html

 

Here's the relevant code....

$torrent_metadata_size = filesize($file["tmp_name"]); //retrieve metadata file size

if ($torrent_metadata_size == 0) //0 length file

$returnString = "<p CLASS=\"err\">Torrent with length of 0 (zero) bytes uploaded. ".
				"Please check your torrent.</p>";

else
{
//Obtain file information
$fd = fopen($file["tmp_name"], "rb")
----> $alltorrent = @fread($fd, $torrent_metadata_size);
$array = BDecode($alltorrent);

fclose($fd);
        ....

 

The arrowed line is throwing the error. I'm not certain where I should begin debugging this code. Can anyone assist?

 

-Capn

Link to comment
https://forums.phpfreaks.com/topic/179070-solved-unexpected-t_variable-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.