php 文件路径设置 set_include_path(); get_include_path();
2014-02-10 20:59
696 查看
<?php set_include_path($string); //设置路径 get_include_path(); // 获取当前的路径 //例如:文件路径为: //D:/phpweb/demo/test.php //test.php内容为: echo "hi"; //D:/phpweb/index.php //index.php内容为: set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__)."/demo/"); require_once("test.php"); //用 PATH_SEPARATOR分格目录(window 为 ; linux 为 :) // 这样就可以调用test.php文件里面的内容了 ?>
相关文章推荐
- php中的路径问题与set_include_path
- php.ini文件中的include_path设置
- php的set_include_path与get_include_path()的用法
- php中的路径问题与set_include_path
- 【php】set_include_path和get_include_path用法详解
- PHP--set_include_path和get_include_path用法详解
- PHP包含文件---set_include_path
- php.ini文件中的include_path设置
- php中的路径问题与set_include_path使用介绍
- php.ini文件中的include_path设置
- php.ini文件中的include_path设置
- php.ini文件中的include_path设置
- php中的路径问题与set_include_path使用介绍
- php.ini文件中的include_path设置
- php.ini文件中的include_path设置和$_SERVER['DOCUMENT_ROOT']
- php.ini文件中的include_path设置,载入smarty库
- 设置include和require的目录get_include_path与set_include_path
- php手记-set_include_path和get_include_path用法详解
- php.ini文件中的include_path设置
- php get_include_path();是干嘛的、??还有set_include_path();/?????