标签:new php c file br di l if 例子
小例子如下:
<?php
$the_full_name = __FILE__;
$the_file = dirname(__FILE__);
echo $the_full_name.‘<br/>‘.$the_file.‘<br/>‘;
$the_new_name = __DIR__;
$the_dir = dirname(__DIR__);
echo $the_new_name.‘<br/>‘.$the_dir.‘<br/>‘;
if($the_file === $the_new_name){
echo ‘__DIR__是代替dirname(__FILE__)的常量‘;
}
?>
标签:new php c file br di l if 例子
原文地址:http://www.cnblogs.com/anns/p/4087557.html