[英]Why can't I use $session_start()?
I got this error. 我得到这个错误。
Notice: Undefined variable: session_start in C:\wamp\www\check.php on line 3
It says undefined variable on line 3, but here's line 3. 它在第3行显示未定义的变量,但在第3行显示。
$session_start();
Why is this happening? 为什么会这样呢? Isn't session_start predefined?
session_start是否未预定义?
session_start()
is a function. session_start()
是一个函数。
$session_start
would be a variable if you defined it. 如果定义了
$session_start
它将是一个变量。 The error message you're reading is simply telling you that the variable that you're trying to call as a function doesn't exist as such. 您正在阅读的错误消息只是在告诉您您试图作为函数调用的变量不存在。
session_start()
这不是一个变量。
session_start()
is not a variable, but a function. session_start()
不是变量,而是函数。 You do not need the dollar sign. 您不需要美元符号。 Change it to
更改为
session_start()
and it should work. 它应该工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.