file_put_contents函数写入数据的问题 file_put_contents函数怎么写入数据 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 使用fwrite和file_put_contents函数写入数据 <?php $filepath = "05.txt"; $str = "此情可待成追忆 只是当时已惘然<br>"; echo "用fwrite函数写入文件:"; $fopen = fopen($filepath,'wb') or die('文件不存在'); fwrite($fopen,$str); fclose($fopen); readfile($filepath); echo "<p>用file_put_contents函数写入文件:"; file_put_contents($filepath,$str); readfile($filepath);?>http://www.phpzc.com/read.php?tid-690.html 遇到什么问题吗?若问用法,请参考PHP手册以及相关页面实例 http://www.phpzc.com/read.php?tid-690.html 这个上面是个完整例子吧 不过还是谢谢二楼 有高手能帮忙修改一下不?? eclipsePHP studio 如何配置svn 安装zend core 2.5的时候,提示不能下载mysql? 谁能帮我分析一下这条语句 字符串替换的问题,请教高手 加载页面时的问题 高分求一sql语句,关于3表联合update(只修改其中之一) 站内邮件实现附件功能问题求助 大家帮忙看看!!! php socket 编程 测试问题 PHP生成图片带BOM的问题? 在js中怎么取出php的变量值
$filepath = "05.txt";
$str = "此情可待成追忆 只是当时已惘然<br>";
echo "用fwrite函数写入文件:";
$fopen = fopen($filepath,'wb') or die('文件不存在');
fwrite($fopen,$str);
fclose($fopen);
readfile($filepath);
echo "<p>用file_put_contents函数写入文件:";
file_put_contents($filepath,$str);
readfile($filepath);
?>http://www.phpzc.com/read.php?tid-690.html
若问用法,请参考PHP手册以及相关页面实例