Home > Backend Development > PHP Tutorial > include+dirname有关问题

include+dirname有关问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 13:16:16
Original
957 people have browsed it

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";
------解决方案--------------------
加了就成字符串了 而不是函数

探讨

引用:

去掉两端的单引号

这里加了引号,为什么就错了呢
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template