如题所述
å¯ä»¥ä½¿ç¨phpçobç¼åæ¥å®ç°éæ页é¢ççæã
æ¯å¦ï¼
ä½ åæ¬è¦è¾åºa.php页é¢çå 容ï¼ä½æ¯è¿ä¸ªæ¯phpçå¨ææ件ï¼æ¯è¦ç»è¿å¤ççï¼
å æ¤ï¼ä½ å¨è¯¥æ件çå°¾é¨ï¼å¨ä¸å¡é½å¤çå®äºçå°æ¹ï¼ï¼å¼å§obç¼åï¼ob_start();ï¼ï¼
ç¶åå°ç¼ååå ¥å°ä¸ä¸ªåéï¼$content = ob_get_contents();ï¼ï¼æååå°è¯¥åéä¿åå°
éæçhtmlæ件ä¸ï¼file_put_contents('/a.html','$content');ï¼å°±å¯ä»¥äºã
æ¯å¦ï¼
ä½ åæ¬è¦è¾åºa.php页é¢çå 容ï¼ä½æ¯è¿ä¸ªæ¯phpçå¨ææ件ï¼æ¯è¦ç»è¿å¤ççï¼
å æ¤ï¼ä½ å¨è¯¥æ件çå°¾é¨ï¼å¨ä¸å¡é½å¤çå®äºçå°æ¹ï¼ï¼å¼å§obç¼åï¼ob_start();ï¼ï¼
ç¶åå°ç¼ååå ¥å°ä¸ä¸ªåéï¼$content = ob_get_contents();ï¼ï¼æååå°è¯¥åéä¿åå°
éæçhtmlæ件ä¸ï¼file_put_contents('/a.html','$content');ï¼å°±å¯ä»¥äºã
温馨提示:答案为网友推荐,仅供参考