PHP Includes不起作用


PHP Includes Does Not Work

我刚刚签约开发了一个web应用程序。从Github中提取代码后,我一直在努力让它在我的本地开发设置中发挥作用。有一个问题。名为"signup_action.php"的文件的开头是这样的:

 <?php
ini_set('display_errors', true);
error_reporting(E_ALL | E_STRICT);
echo getcwd() . "<br>"; //for testing
echo getcwd() . "/code/includes.php" . "<br>"; //for testing
include("./code/includes.php");
//include(getcwd() . "/code/includes.php");
echo("Hello from point 3 <br>"); //for testing
...

然后,如果我转到代码/includes.php的开头,我会得到以下内容:

<?php
echo "Hello from point 1 of code/includes.php" . "<br>";
include_once("local_config.php");
//ini_set("memory_limit", "128M");
date_default_timezone_set("EST");

浏览器中signup_action.php的输出为:

/用户/genericuser/www/sites/project1

/Users/genericuser/www/sites/project1/code/includes.php

为什么我没有看到includes.php的任何"echo"输出?在我发现signup_action.php没有执行其功能并给我一个空白页面后,我开始对此进行故障排除。include()有效吗?

include_one和date_default_timezone应该在其他PHP代码操作之前解决。

include_one("local_config.php");//ini_set("memory_limit","128M");

date_default_timezone_set("EST");

echo"Hello from point 1 of code/includs.php"。"
";