时间:2021-07-01 10:21:17 帮助过:12人阅读
";while ($row = mysql_fetch_array($query)) { //echo $row[imgname]; $imageurl="../workshow/images/".$row[imgname]; cutphoto("$imageurl","$imageurl",200,113); $str=$str.""; //echo $row[imgname];}header("content-type:text/html; charset=utf-8"); //指定PHP使用UTF-8编码$xml = simplexml_load_file("../workshow/xml/thumbnails.xml"); //读取xml文件$str = $xml->asXML(); //标准化$xml$fp = fopen("../workshow/xml/thumbnails.xml", "w"); //新建xml文件fputs($fp, $str); //写入-------xml文件fclose($fp);?>
循环中
$str=$str."
$str = $xml->asXML();
那么,缓存的查询结果不就被覆盖了吗?