关于文件保存

qwa 2011-02-15 03:11:23
function getPreload($setCookie){
$cLoad = curl_init();
$cOption = array(
CURLOPT_URL => "http://www.sohu.com",
CURLOPT_HEADER => 0,
CURLOPT_NOBODY => 0,
CURLOPT_POST => 0,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_FOLLOWLOCATION => 1,
CURLOPT_COOKIEJAR => $setCookie,
CURLOPT_COOKIEFILE => $setCookie,
);
curl_setopt_array($cLoad, $cOption);
$rLoad = curl_exec($cLoad);
curl_close($cLoad);
return $rLoad;
}

//Get the reference of Hash
$sLoad = getPreload($setCookie);
如何将$sLoad 保存到文件e:\a.txt中
...全文
149 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
coder 2011-08-25
  • 打赏
  • 举报
回复
楼上v5
hqaht 2011-08-16
  • 打赏
  • 举报
回复

$handle = fopen("e:\\a.txt", "w");
fwrite($handle,$sLoad);
fclose($handle);
丁文更 2011-08-01
  • 打赏
  • 举报
回复
这个问题很简单啦,看下手册就知道啦~~
deyygywxf 2011-03-09
  • 打赏
  • 举报
回复
file_put_contents("a.txt",$sLoad);
ihefe 2011-02-15
  • 打赏
  • 举报
回复
发帖重复
file_put_contents("e:\tst.txt",$sLoad);
life169 2011-02-15
  • 打赏
  • 举报
回复

file_put_contents("a.txt",$sLoad);

4,250

社区成员

发帖
与我相关
我的任务
社区描述
国内外优秀PHP框架讨论学习
社区管理员
  • Framework
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧