php读取在线远程txt文档内容到数组并遍历

<?php $txt = "http://www.xxx.cn/sitemap.txt"; //读取远程txt; //是否存在 if(file_get_contents($txt)){ $data = file($txt); //将文件存放在一个数组中; $num = count($data); //条数; $id = mt_rand(0,$num-1); //随机数字; $url = ch
相关文章
相关标签/搜索