首页上一页 1 下一页尾页 1 条记录 1/1页
怎么老是显示“syntax error”
发表在PHP图书答疑
2010-12-24
是否精华
是
否
版块置顶:
是
否
测试程序代码:
8. <?PHP
9. $test = "php"
10.$str1 = "i like $test";
11.$str2 = 'I like $test';
12.echo $str1 ;
13.echo $str12;
14.?>
调试结果:Parse error: syntax error, unexpected T_VARIABLE in D:\AppServ\www\Untitled-1.php on line 10
修改为:
8. <?PHP
9. $test = "php"
10./*$str1 = "i like $test";*/
11.$str2 = 'I like $test';
12.echo $str1 ;
13.echo $str12;
14.?>
运行结果为:Parse error: syntax error, unexpected T_VARIABLE in D:\AppServ\www\Untitled-1.php on line 11
修改为:
8. <?PHP
9. $test = "php"
10./*$str1 = "i like $test";*/
11./*$str2 = 'I like $test';*/
12.echo $str1 ;
13.echo $str12;
14.?>
运行结果:Parse error: syntax error, unexpected T_ECHO in D:\AppServ\www\Untitled-1.php on line 12
小弟正在学习php,请高手解决,谢谢
8. <?PHP
9. $test = "php"
10.$str1 = "i like $test";
11.$str2 = 'I like $test';
12.echo $str1 ;
13.echo $str12;
14.?>
调试结果:Parse error: syntax error, unexpected T_VARIABLE in D:\AppServ\www\Untitled-1.php on line 10
修改为:
8. <?PHP
9. $test = "php"
10./*$str1 = "i like $test";*/
11.$str2 = 'I like $test';
12.echo $str1 ;
13.echo $str12;
14.?>
运行结果为:Parse error: syntax error, unexpected T_VARIABLE in D:\AppServ\www\Untitled-1.php on line 11
修改为:
8. <?PHP
9. $test = "php"
10./*$str1 = "i like $test";*/
11./*$str2 = 'I like $test';*/
12.echo $str1 ;
13.echo $str12;
14.?>
运行结果:Parse error: syntax error, unexpected T_ECHO in D:\AppServ\www\Untitled-1.php on line 12
小弟正在学习php,请高手解决,谢谢