Friday, 2 March 2018

php - Parse error T_Variable




This is my code:



  $content = file_get_contents("http://aux.iconpedia.net/uploads/1337412470.png");
$fp = fopen("/test/image.jpg", "w");
fwrite($fp, $content);
fclose($fp);
?>



And this is the error I get:



Parse error: syntax error, unexpected T_VARIABLE in D:\Host\5164\html\maffick1\test\download.php on line 2


As far as I know, this error comes when you miss semicolon or bracket. But I have tried everything. Please help me.


Answer



Remove space between question mark and "php" in first line:






Change this to:




No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...