国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

? php教程 php手冊 php2html php生成靜態(tài)頁函數(shù)

php2html php生成靜態(tài)頁函數(shù)

Jun 13, 2016 pm 12:25 PM
php ?? ???? ??

/**
------------------------
Function: php2html($in_Url, $out_htmlFile, $out_logFile)
------------------------
@ Description: 生成靜態(tài)函數(shù)
@ Copyright: Copyright (c) 2006 - 2011
@ Create: 2006-08-01
@ Modify: 2006-10-27
@ 提示:這里要用到的路徑為服務(wù)器絕對路徑; 若給定的路徑目錄不存在則自動創(chuàng)建
=======================================================================================
@ Example:php2html("http://www.jb51.net", "/www/html/index.html", "/www/log/log.txt");
*/
// {{{ contents
function php2html($in_Url, $out_htmlFile, $out_logFile)
{
$htmlContent = file_get_contents($in_Url); //將文件讀入 $htmlContent 變量
/**
* @檢查要生成的文件是否存在
*/
if (is_file($out_htmlFile))
{
@unlink($out_htmlFile);//若文件已存在,則刪除
}
/**
* @ 創(chuàng)建目錄 網(wǎng)頁部分
*/
$dir_array = explode("/", dirname($out_htmlFile));
chdir("/"); //改變目錄到根
for($i=1;$i{
if(is_dir($dir_array[$i]))
{
chdir($dir_array[$i]);
}
else
{
mkdir($dir_array[$i]);
chdir($dir_array[$i]);
}
}
/**
* @ 創(chuàng)建目錄 日志部分
*/
$dir_array = explode("/", dirname($out_logFile));
chdir("/"); //改變目錄到根
for($i=1;$i{
if(is_dir($dir_array[$i]))
{
chdir($dir_array[$i]);
}
else
{
mkdir($dir_array[$i], 0777);
chdir($dir_array[$i]);
}
}
$handle = fopen($out_htmlFile, "w"); //打開文件指針,創(chuàng)建文件
$logHandle = fopen ($out_logFile, "a+"); //打開日志文件
/**
* @檢查目錄是否可寫
*/
if (!is_writable($out_htmlFile))
{
echo "文件:".$out_htmlFile."不可寫,請檢查目錄屬性后重試";
exit();
}
if (!is_writable($out_logFile))
{
echo "文件:".$out_logFile."不可寫,請檢查目錄屬性后重試";
exit();
}
/**
* @寫入文件
*/
if (!fwrite ($handle, $htmlContent))
{
$logMsg = "寫入文件" . $out_htmlFile . "失敗";
}
else
{
$logMsg = "創(chuàng)建文件" . $out_htmlFile . "成功";
}
/**
* @記錄日志
*/
$logMsg .= "(".date("Y-m-d H:i:s") .")\r\n";
fwrite ($logHandle, $logMsg);
fclose($logHandle); //關(guān)閉日志指針
fclose ($handle); //關(guān)閉指針
}
// }}}
php2html("http://www.jb51.net", dirname(__FILE__)."/yanjing_html/index.html", dirname(__FILE__)."/yanjing_log/log.txt");
echo "成功";
?>

? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

? AI ??

Undresser.AI Undress

Undresser.AI Undress

???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover

AI Clothes Remover

???? ?? ???? ??? AI ?????.

Video Face Swap

Video Face Swap

??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

???

??? ??

???++7.3.1

???++7.3.1

???? ?? ?? ?? ???

SublimeText3 ??? ??

SublimeText3 ??? ??

??? ??, ???? ?? ????.

???? 13.0.1 ???

???? 13.0.1 ???

??? PHP ?? ?? ??

???? CS6

???? CS6

??? ? ?? ??

SublimeText3 Mac ??

SublimeText3 Mac ??

? ??? ?? ?? ?????(SublimeText3)

???

??? ??

?? ????
1783
16
Cakephp ????
1728
56
??? ????
1579
28
PHP ????
1444
31
???
??? ??? ?? ?? : PHP ??? ??? ??? ?? ?? : PHP ??? Jul 15, 2025 am 02:48 AM

phphasthreecommentstyles : //, #forsingle-lineand/.../formulti-lline.usecommentstoexplainwhycodeexists, notwhatitdoes.marktodo/fixMeitemsandDisableCodeTemporlinlyDuingDeBugging.aVoidOver-commentingsimplOgic.writeCoCoCoCoCoConcomeCOCOCOCONCOCOCOCOCOCOCOCOCISE

Windows? PHP? ???? ?? Windows? PHP? ???? ?? Jul 15, 2025 am 02:46 AM

Windows? PHP? ???? ?? ???? ??? ?????. 1. ??? PHP ??? ?????? ?? ??????. Apache? ?? ThreadSafe ??? ????? Nginx??? ThreadSafe ??? ???? ?? ????. 2. php.ini ??? ???? php.ini-development ?? php.ini-production? php.ini? ?????. 3. ?? ? ??? ?? ??? ?? ?? ??? PHP ??? ??????. 4. PHP? ????? ?????? ??? ????? ?? ?? ?? PHP-V? ???? ?? ??? ???? ?? ?? ??? ??????. 5. Apache? ???? ?? httpd.conf?? p? ???????.

PHP ?? : ?? PHP ?? : ?? Jul 15, 2025 am 02:46 AM

PHP? ?? ???? 4 ?? ?? ??? ?????. 1. PHP ??? ?????? ??? ??? ???? ?? ?????. 2. Echo ? Print? ????? ?? ???? ????, ??? Echo? ?? ?? ??? ?????? ??????. 3. ?? ???? ?? ???? ??????? //, # ? //; 4. ? ??? ?????? ????? ??? ?? ????? ??? ??? ??? ?? ???? ??? ????. ??? ?? ??? ????? ???? ???? PHP ??? ???? ? ??? ? ? ????.

?? ??? ?? ??? ?? ??? ?? ??? Jul 15, 2025 am 02:55 AM

Python? Ifelse ??? ???? ??? ??? ??? ?? ??? ???? ????. 1. ???? ??? ???? ??? ???? ????. ??? ??? ?? ??? ???? ?? ?????. 2. ?? ?? ??? ELIF? ?? ????, ????? ???? ?? ???? ?????. 3. ?? ?? ??? ???? ?? ?? ? ?? ? ?? ???? ?? ?? ????. 4. 3 ?? ??? ??? ?????? ??? ifelse? ???? ? ??? ? ????. ?? ??, ??? ?? ? ??? ??????? ?????? ??? ???? ???? ?? ??? ??? ? ????.

PHP 8 ?? ??? PHP 8 ?? ??? Jul 16, 2025 am 03:41 AM

???? PHP8? ???? ??? ??? ????. 1. ????? ??? ?? ????; 2. PHP8 ? ?? ?? ??? ??????. 3. ??? ????? ????? ??? ??????. 4. ??? ?? ?? ??? ??????. Windows ???? Zip ???? ?????? ?? ?? ? ?? ?? ??? ???? ???? ????? ?? ??? ??? ?? ? ? ????. MACOS ???? Homebrew? ???? ? ??, PHP8 ??, ?? ?? ?? ? ?? ??? ?? ??? ???? ?? ????. ?? ??? ?? ????? ???? ????? ????? ??? ?? ??? ??? ??? ? ????.

PHP ? ???? ??? ?????? PHP ? ???? ??? ?????? Jul 16, 2025 am 03:45 AM

phpisaserver-sideScriptingLanguageUsedForWebDevelopment, ?? ProcessesData, InteractSwithDatabases ? SendShtmlTobrowsers.commonusesincludeusera-sectentication, e-commerceplatforms

? ?? PHP ???? : ???? ?? ? ?? PHP ???? : ???? ?? Jul 16, 2025 am 03:42 AM

? ?? PHP ???? ??? ???? ??? ?????? ?? ?? ?? ??? ???? XAMPP/MAMP/LAMP? ?? ? ?? ??? ???? ???? ??? ???? ??? ?????. ??, hello.php?? ??? ??? ?? ??? ???? ???? ??????. ??, PHP ? HTML? ???? ?? ??? ??? ???? ?? ????. ?????, ???? ??, ?? ?? ? ?? ?? ??? ?? ???? ?????? ???? ???? ?? ????? ???????.

PHP?? ?? ?? (??/??)? ??? ?????? PHP?? ?? ?? (??/??)? ??? ?????? Jul 16, 2025 am 03:48 AM

ToHandleFileOperationsInphp, useAppreptFunctionsandModes.1.TOREADAFILE, USEFILE_GET_CONTENTS () FORSMALLFILESORFGETS () inALOOPFORLE-by-lineProcessing.2.TOWRITETOAFILE, USEFILE_PUTE_CONTENTS () USEFILE_PUTE_CONTENTS () FORSIMPLEWRITE () FORSIMPLAGFILE (ORFENDFLAG)

See all articles