contants有啥不一样啊求大神简单点?
fwrite写入字符串
<?php
$file = fopen("test.txt","w");
echo fwrite($file,"Hello World. Testing!");
fclose($file);
?>
上面的代码将输出:
21file_put_contants写入字符串
<?php
file_put_contants("test.txt","Hello World. Testing!");
?>
一句话,file_put_contants() 封装了封装了文件打开,关闭的过程.
Copyright © 广州京杭网络科技有限公司 2005-2025 版权所有 粤ICP备16019765号
广州京杭网络科技有限公司 版权所有