Heim  >  Artikel  >  Backend-Entwicklung  >  php中include文件夹分析,_PHP教程

php中include文件夹分析,_PHP教程

WBOY
WBOYOriginal
2016-07-12 08:55:45930Durchsuche

php中include文件夹分析,

include是包含很多php文件的一种汇总;一般放在文件夹最外层。

<?<span>php 
</span><span>header</span>("content-type:text/html;charset=utf-8");<span>//</span><span>设置字符</span>
date_default_timezone_set("PRC");<span>//</span><span>设置时间区域为中国</span>
<span>session_start</span>();<span>//</span><span>全局开启session</span>
<span>define</span>("ROOT",<span>dirname</span>(<span>__FILE__</span>));<span>//</span><span>__FILE__是当前文件的绝对完整路径;dirname()获取返回当前文件路径的 绝对路径部分</span>
<span>set_include_path</span>(".".PATH_SEPARATOR.ROOT."/lib".PATH_SEPARATOR.ROOT."/core".PATH_SEPARATOR.ROOT."/configs".PATH_SEPARATOR.<span>get_include_path</span><span>());
</span><span>//</span><span>set_include_path()是设置包含文件的路径</span>
<span>require_once</span> 'mysql.func.php'<span>;
</span><span>require_once</span> 'image.func.php';

 

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/1115249.htmlTechArticlephp中include文件夹分析, include是包含很多php文件的一种汇总;一般放在文件夹最外层。 ? php header ("content-type:text/html;charset=utf-8"); // 设置字...
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn