如何 include 上一级目录下的PHP文件?? 如果确定文件都存在,且位置没有错,那就是权限问题,用ftp工具改成777 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我估计你的include的文件里还include了其他文件造成的两次include的目录层次不同例如,你的文件是index.php其中include("inc/a.php")而a.php中又include("b.php")这样就会出错 一.如果你用的是ii6,请在IIS的目录里"启用父目录"二.如果还有问题的话就尝试定义$paths$paths=".";include("$paths/art97/config.php"); 1、请确认文件../config.php真实存在且可读2、用include(realpath('../config.php'));载入 强!用 include(realpath('../config.php')) 第一次听说... include "/../config.php";include "./../config.php";都试试-_____________-!!! 你的目录结构可能是这样的:|-inc-|-main_info.php| |-……|-config.php|-index.php|-……如果在index.php中include main_info.php,而在main_info.php中又include config.php,那么在main_info.php中应该这样写:include('./config.php'); 干脆 if(file_exist('./config.php') include_once('./config.php'); if(file_exist('../config.php') include_once('../config.php');不过这样编程可不好 初识Smarty模板的小问题 服务器由iis转换为apache出现字符被截断! 关于rbac权限系统 紧急求助为什么用ie好使和用qq的浏览器就不好使(加急) 在<select>标签允许多选的时候,PHP怎么接收<select>中的多个选择? 为什么屏蔽不了空格? 日期计算 学php语言 而不懂数据库 有前途没? foreach循环中,这样的变化如何写 从数据库里取数据,有数据,却echo不出来,紧急求助 大家,是怎样从数据库中调用栏目内容的? 在frssbsd下,怎么编译让PHP支持GD库,和mhash库
两次include的目录层次不同例如,你的文件是index.php
其中include("inc/a.php")
而a.php中又include("b.php")这样就会出错
二.如果还有问题的话就尝试定义$paths$paths=".";
include("$paths/art97/config.php");
2、用include(realpath('../config.php'));载入
用 include(realpath('../config.php')) 第一次听说...
include "./../config.php";
都试试-_____________-!!!
|-inc-|-main_info.php
| |-……
|-config.php
|-index.php
|-……如果在index.php中include main_info.php,而在main_info.php中又include config.php,那么在main_info.php中应该这样写:include('./config.php');
include_once('./config.php');
if(file_exist('../config.php')
include_once('../config.php');
不过这样编程可不好