日期:2014-05-17 浏览次数:20671 次
function Write_FileFun_new($filename,$filedir, $htmldata = '') {
if(!is_dir($filedir)) {
mkdir($filedir, 0777);
}
$htmlfile = $filedir.$filename;
if($fp = fopen($htmlfile, 'wbt')) {
fwrite($fp,$htmldata);
fclose($fp);
} else {
echo "<center><p>Can not write to files, please check directory $htmldir.</p></center>";
exit;
}
}
$testnum_temp="<?php \$testnum = ".(intval($testnum)+1)."; ?>";
Write_FileFun_new("test.php","inc/", $testnum_temp);