Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已将 PHP 从 v5.3 升级到 v5.4,现在出现以下错误:
严格的标准:只能通过引用传递变量
代码:
$filename = array_pop(explode("/", $_SERVER['SCRIPT_FILENAME']));
如何解决这个问题?
将代码分开将解决错误
$filename = explode("/", $_SERVER['SCRIPT_FILENAME']); $filename = array_pop($filename); echo $filename ;
演示分开