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";
------解决方案--------------------
加了就成字符串了 而不是函数
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号