Expecting statement after if
这是我的代码:
1 2 3 4 5 6 7 8 |
我得到错误:在var $ c之前期待语句。 我怎样才能解决我的问题?
Note: The PHP 4 method of declaring a variable with the var keyword is still supported for compatibility reasons (as a synonym for the public keyword). In PHP 5 before 5.1.3, its usage would generate an E_STRICT warning.
只需正常分配变量:
1 | $c = $_COOKIE['count']; |
否则,它期待在课堂内。
您需要在if语句之前声明变量$ c。
1 2 3 4 5 6 7 8 9 |