<?php header("content-type:text/html; charset=utf-8"); //设置编码 $lists = simplexml_load_file('auction_end_tomorrow.xml'); $channel = $lists->channel; $titles = array(); $str=''; foreach($channel->item as $items){ //有多个user,取得的是数组,循环输出 $str .=$items->title."\r\n";; } $k=fopen("d:\\auction_end_tomorrow.txt","a+");//此处用a+,读写方式打开,将文件指针指向文件末尾。如果文件不存在则尝试创建之 fwrite($k,$str); fclose($k); ?>
點擊查看更多內容
為 TA 點贊
評論
評論
共同學習,寫下你的評論
評論加載中...
作者其他優質文章
正在加載中
感謝您的支持,我會繼續努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦