<?php $yyr='';$jhcnum=0; $jhcsql=$empire->query("select * from {$dbtbpre}ecms_map"); while($jhcr=$empire->fetch($jhcsql)){ $jhcnum++; $yyr.="yiyuanr[$jhcnum]={pro:'$jhcr[pro]',city:'$jhcr[city]',titleurl:'$jhcr[titleurl]',title:'$jhcr[title]'};".PHP_EOL; } $fg='//yiyuandata'; $js=file_get_contents(ECMS_PATH.'e/jhc/BMap/jhc.js'); $jsr=explode($fg,$js); $js=$jsr[0].$fg.PHP_EOL.$yyr; file_put_contents(ECMS_PATH.'e/jhc/BMap/jhc.js',$js); ?>