我收到了很多未定义的变量错误在Zend Studio的10未定义的变量错误
我有一个PHP文件是这样的:
文件var.php
<?php
$functions = $root."/requires/functions.php";
$top_utf = $root."/requires/top_utf.php" ;
$database = $root."/requires/db.php" ;
$footer = $root."/requires/pageFooter.php" ;
?>
现在,如果我在一个php文件中使用下面的代码,zend studio显示未定义变量所有require_once行上的错误。 (如果我访问该页面使用浏览器按预期的方式显示页面,它完美的作品。)
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
require_once($root."/requires/vars.php") ;
require_once($functions);
require_once($top_utf);
require_once($database);
require_once($footer);
?>
不Zend Studio的认识包含文件中(var.php在这种情况下)声明的变量? 由于$ functions和$ top_utf变量是在var.php中定义的,我相信我不应该收到这些错误。 任何类型的建议,非常感谢。
你在你的示例代码typo'd“$函数”定义常量,顺便说一句。 – dualmon
谢谢。发生这种帮助请求时发生了这种情况。主要的PHP文件是正确的。 – Tera