如何解决此错误:解析错误:语法错误,第34行的C:\ wamp64 \ www.hum \PHP \ profile.php中的意外'$ _SESSION'(T_VARIABLE) [英] How to fix this error:parse error: syntax error, unexpected '$_SESSION' (T_VARIABLE) in C:\wamp64\www\luana\PHP\profile.php on line 34

查看:163
本文介绍了如何解决此错误:解析错误:语法错误,第34行的C:\ wamp64 \ www.hum \PHP \ profile.php中的意外'$ _SESSION'(T_VARIABLE)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿我在wamp服务器上做这个任务,但我遇到了这个错误。这是一个合成错误,但我试图看到语法错误在哪里,我似乎无法找到它



这是错误产生的地方,在这一行在代码中:



 $ sql =SELECT * FROM uname ='$ _ SESSION ['users']'; 





这就是错误所说的:

解析错误:语法错误,意外的'$ _SESSION'(T_VARIABLE)in第34行C:\ wamp64 \ www.h \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\尝试过: 



试图查找错误。一直在来回寻找错误的位置,但无法找到它

解决方案

sql =SELECT * FROM uname ='


_SESSION ['users']';





这就是错误所说的:

解析错误:语法错误,意外的'


_SESSION'(T_VARIABLE)在第34行的C:\ wamp64 \\\\ luana \ php \ profile.php





我尝试过:



试图寻找错误。一直在来回寻找错误的位置,但无法找到它


hey I am doing this assignment in the wamp server but i came across this error. it is a syntx error but i am trying to see where the syntax error is i cant seem to find it at all

this is where the error originate, on this line in the code:

$sql ="SELECT * FROM uname ='"$_SESSION['users']"'";



and this is what the error says:

Parse error: syntax error, unexpected '$_SESSION' (T_VARIABLE) in C:\wamp64\www\luana\php\profile.php on line 34



What I have tried:

trying looking for the error. have been going back and forth searching to see where the error is but cant find it

解决方案

sql ="SELECT * FROM uname ='"


_SESSION['users']"'";



and this is what the error says:

Parse error: syntax error, unexpected '


_SESSION' (T_VARIABLE) in C:\wamp64\www\luana\php\profile.php on line 34



What I have tried:

trying looking for the error. have been going back and forth searching to see where the error is but cant find it


这篇关于如何解决此错误:解析错误:语法错误,第34行的C:\ wamp64 \ www.hum \PHP \ profile.php中的意外'$ _SESSION'(T_VARIABLE)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆