一个小函数

时间:2015-03-31 12:37:42   收藏:0   阅读:266
//
    
    function makeTemp($fileName="index",$ftype=0)
    {
        $tempPath="xx/xxxx/{$fileName}.html";
        if(file_exists($tempPath))
        {
            return $tempPath;
        }else{
            return false;
        }
    }
//然后 if(↓)
require_once(makeTemp(‘test‘));

//xx/xxxx/test.html

 

原文:http://www.cnblogs.com/love-zf/p/4380321.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!