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

php calls the path to the server

WBOY
Release: 2016-09-13 09:00:17
Original
1223 people have browsed it

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

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

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

Reply content:

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

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

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

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>
Copy after login
Related labels:
php
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template