码迷,mamicode.com
首页 > 其他好文 > 详细

set_include_path get_include_path

时间:2015-09-01 21:27:15      阅读:168      评论:0      收藏:0      [点我收藏+]

标签:

set_include_path("123/");  

get_include_path — 获取当前的 include_path 配置选项

string get_include_path ( void )
 
 
function initialize()  
{
set_include_path(get_include_path().PATH_SEPARATOR . "core/");  
set_include_path(get_include_path().PATH_SEPARATOR . "app/");  
set_include_path(get_include_path().PATH_SEPARATOR . "admin/");  
set_include_path(get_include_path().PATH_SEPARATOR . "lib/");  
set_include_path(get_include_path().PATH_SEPARATOR . "include/");  
set_include_path(get_include_path().PATH_SEPARATOR."data/");  
set_include_path(get_include_path().PATH_SEPARATOR."cache/");  
 
...
}
 
PATH_SEPARATOR是一个常量,在Linux系统中是一个" : "号,Windows上是一个";"号。所以编写程序时最好用常量 PATH_SEPARATOR 代替,否则如果系统从linux移植到win系统或反过来移植会出错!
 
 

set_include_path get_include_path

标签:

原文地址:http://www.cnblogs.com/telfair66/p/4776795.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!