“解析错误:语法错误,意外的T_VARIABLE". [英] "Parse error: syntax error, unexpected T_VARIABLE"
本文介绍了“解析错误:语法错误,意外的T_VARIABLE".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的代码:
<? php
$content = file_get_contents("http://aux.iconpedia.net/uploads/1337412470.png");
$fp = fopen("/test/image.jpg", "w");
fwrite($fp, $content);
fclose($fp);
?>
这是我得到的错误:
解析错误:语法错误,第2行D:\ Host \ 5164 \ html \ maffick1 \ test \ download.php中出现意外的T_VARIABLE
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 a semicolon or bracket. But I have tried everything.
推荐答案
在第一行中删除问号和"php"之间的空间:
Remove space between question mark and "php" in first line:
<? php
将此更改为:
<?php
这篇关于“解析错误:语法错误,意外的T_VARIABLE".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文