Home  >  Article  >  Backend Development  >  php-PHP中require_once不同目录下引用文件出错

php-PHP中require_once不同目录下引用文件出错

WBOY
WBOYOriginal
2016-06-02 11:32:261509browse

引用phprequire once

目录结构是这样的:
1.php
3.php
文件夹2
2.php
1.php中require_once 2和3文件
2.php中又require_once 3.php
报错Fatal error: require_once(): Failed opening required '../3.php'
当2.php放置在与13同一目录下则不会出错
不懂这是怎么回事?

Statement:
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