require类中的PHP访问变量

require类中的PHP访问变量,php,class,variables,global,require,Php,Class,Variables,Global,Require,我目前正在从事一个Web项目,我需要帮助设置克隆 我安装了WampServer 2.2,因为它使用了一些不推荐使用的功能 有些页面使用此选项: config.php Mainpage.php 在这些页面上,浏览器显示: Warning: require() [function.require]: Filename cannot be empty... Wamp中的设置可能不好,但我没有找到: 我曾尝试在php.ini中打开register_globals,但没有任何区别 谢谢$projectp

我目前正在从事一个Web项目,我需要帮助设置克隆

我安装了WampServer 2.2,因为它使用了一些不推荐使用的功能

有些页面使用此选项:

config.php

Mainpage.php

在这些页面上,浏览器显示:

Warning: require() [function.require]: Filename cannot be empty...
Wamp中的设置可能不好,但我没有找到:

我曾尝试在php.ini中打开register_globals,但没有任何区别

谢谢

$projectpage直接在类中定义


这段代码在生产服务器上工作,因此我认为这是Wamp中的一个设置,它只是告诉您$projectpage没有在调用或覆盖require的范围中定义。显示config.phpThanks的内容以进行说明。这是一个常见的问题,这就是为什么我知道这可能是原因。
require 'config.php';
require $projectpage;
Warning: require() [function.require]: Filename cannot be empty...