您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

include+dirname有关问题

2025/8/6 4:44:42发布24次查看
include+dirname问题
在a.php中有这么一句,include 'dirname(__file__)./1.php';本义是想把和a.php在同一路径下的1.php给包含进来,但在执行时,报错如下:
php warning: include(dirname(__file__)./lcsclass.php): failed to open stream: no such file or directory in /home/ninglan.cc/test/test/metadatacomp.php on line 4
我要怎么改呢?
------解决方案--------------------
include dirname(__file__)./1.php;
------解决方案--------------------
加了就成字符串了 而不是函数
探讨
引用:
去掉两端的单引号
这里加了引号,为什么就错了呢
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product