获取模板所在目录 Monxin专用(PHP代码函数)

来源:互联网 发布:淘宝山店软妹模特 编辑:程序博客网 时间:2024/04/29 09:10
//获取模板所在目录 Monxin专用(PHP代码函数)//本代码基于Monxin 运行//代码来源:Monxin ./config/functions.phpfunction get_template_dir($path){$t=str_replace(DIRECTORY_SEPARATOR,"/",$path);//echo $t;$t=explode("templates/",$t);$t=explode("/",$t[1]);$dir='';for($i=0;$i<count($t)-1;$i++){$dir.=$t[$i]."/";}return "templates/".$dir;}

0 0
原创粉丝点击