先贴代码:
<?php
error_reporting(7);
echo "000";include_once('../inc/common.inc.php');
echo "sss";
include_once("header.php");
print<<<EOF
<link href="style.css" rel="stylesheet" type="text/css" />
EOF;
?>调用路径没有问题,可是第一个require就是不起作用,郁闷。只输出了‘000’,也没有任何的报错和警告!
本地测试时没有问题的,可一旦传到服务器(Linux系统)上就出现了上述问题。
求高手解答!
<?php
error_reporting(7);
echo "000";include_once('../inc/common.inc.php');
echo "sss";
include_once("header.php");
print<<<EOF
<link href="style.css" rel="stylesheet" type="text/css" />
EOF;
?>调用路径没有问题,可是第一个require就是不起作用,郁闷。只输出了‘000’,也没有任何的报错和警告!
本地测试时没有问题的,可一旦传到服务器(Linux系统)上就出现了上述问题。
求高手解答!
修改成include()试试
□ □
■ 忍以明志 勤以致远 ■
□ □
■□■□■□■□■□■□■□■
基于CSDN论坛提供的插件扩展功能,自己做了个签名档工具,分享给大家,欢迎技术交流 :)
--------
With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is
hard to be sure where they are going to land, and it could be dangerous sitting under them as they
fly overhead.
With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is
hard to be sure where they are going to land, and it could be dangerous sitting under them as they
fly overhead.
include_path .:/usr/share/pear
../inc/common.inc.php 的内容。包含的三个文件和它是同级的error_reporting(7); //默认为0,改为7可提示错误。
//date_default_timezone_set('Asia/Shanghai');
set_magic_quotes_runtime(0);if(PHP_VERSION < '4.1.0') {
$_GET = &$HTTP_GET_VARS;
$_POST = &$HTTP_POST_VARS;
$_COOKIE = &$HTTP_COOKIE_VARS;
$_SERVER = &$HTTP_SERVER_VARS;
$_ENV = &$HTTP_ENV_VARS;
$_FILES = &$HTTP_POST_FILES;
}
//引入必要的配置文件及函数库
require_once('config.inc.php');
require_once('global.function.php');
require_once('App_function.php');
require_once('App_function.php');
有点可疑,文件名大小写没有问题吗?你可以试着先把 /usr/share/inc/common.inc.php 的内容都注释掉,看看主程序是不是正常了。■□■□■□■□■□■□■□■
□ □
■ 忍以明志 勤以致远 ■
□ □
■□■□■□■□■□■□■□■
基于CSDN论坛提供的插件扩展功能,自己做了个签名档工具,分享给大家,欢迎技术交流 :)
require_once('config.inc.php');
require_once('global.function.php');
require_once('App_function.php');肯定是你这块有问题..如果require出错的话,你这个文件就会终止运行.所以你在另一个文件中调用是没用的.
如果文件存在,那么楼主看看本地目录结构和服务器的目录结构是否相同