476
社区成员
发帖
与我相关
我的任务
分享
最外层的t.php
<?php
include './aa/function.php';
a();
报错.....
然后t.php要引入的函数文件 function.php
<?php
function a(){
$a=include './bb/data.php';
print_r($a);
}
最后 函数里引入的数据文件 data.php
<?php
return array('a'=>'ajax');
函数a里引入文件路径到底相对于谁啊,
如果函数文件和要引入的data.php在同一目录下,直接include 'data.php' 就对
不论这个函数在那个文件夹离得其他文件调用都没错,但如果函数文件和函数里要引入的文件不在同一目录下,像我上面的,怎么弄,我不想使用绝对路径