php报错" Function name must be a string in xxxx"解决

问题:在写php代码的时候,误将代码写 $name = $_GET("name");运行的时候,提示" Function name must be a string"

解决:$_GET[""]方法写错了.写成了$_GET(""),

原因: 写成$_GET(""),php首先会认为get()是一个方法,但是前面又多了$符号,php又认为这是一个变量,而变量名不能作为function的名字,所有会抛出"Function name must be a string"。

发布了44 篇原创文章 · 获赞 2 · 访问量 1745

猜你喜欢

转载自blog.csdn.net/sunsineq/article/details/105307593