Home >Backend Development >PHP Tutorial >php calls the path to the server

php calls the path to the server

WBOY
WBOYOriginal
2016-09-13 09:00:171193browse

<code>定义了        defined('BASE_PATH') || define('BASE_PATH', __DIR__);

echo出是这个  /alidata/www/myali/includes

这个为什么加载不进来?require BASE_PATH.'/header.php';</code>

Reply content:

<code>定义了        defined('BASE_PATH') || define('BASE_PATH', __DIR__);

echo出是这个  /alidata/www/myali/includes

这个为什么加载不进来?require BASE_PATH.'/header.php';</code>

I didn’t understand your question. Do you want to include header.php with include? Then you should write like this:

<code>defined('BASE_PATH') || define('BASE_PATH', __DIR__);
require_once BASE_PATH.'/includes/header.php'</code>
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