HTML代码:
header("Content-Type:text/html; charset=utf-8"); $filepath = "05.txt"; $str = "PHP中文网 www.php.cn"; echo "用fwrite函数写入文件"; $fopen = fopen($filepath,"wb")or die("文件不存在"); fwrite($fopen,$str); fclose($fopen); readfile($filepath); echo " 用file_put_contents函数写入文件:"; file_put_contents($filepath,$str); readfile($filepath); echo " "; echo " ✔执行成功。"; echo " "; //die("你好世界"); //var_dump("你好世界"); //print_r("你好世界"); //sprintf("你好世界", $var); //printf("你好世界", $var); //print("你好世界");
JAVASCRIPT代码:
CSS代码:
发表评论 取消回复