本教程操作环境:windows7系统、PHP8.1版、Dell G3电脑。php function 报错怎么办?php报错" Function name must be a string in xxxx"解决问题描述:在
本教程操作环境:windows7系统、PHP8.1版、Dell G3电脑。
php function 报错怎么办?
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"。
以上就是php function 报错怎么办的详细内容,更多请关注编程网其它相关文章!
--结束END--
本文标题: php function 报错怎么办
本文链接: https://www.lsjlt.com/news/117063.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0