#1 蓝色天擎
批量静态页生成后,页面上对应的spUrl 却还是原先的,改了半天也还是没找到问题所在,求帮助。 另如果是生成单页面make,则没有问题。以下是代码:
public function createBrandsHtml(){
$configObj = spClass("lib_web_config");
$isAllowed = $configObj->find(array("id"=>3),null,"value");
if( 1 == $isAllowed["value"] ){
$brandObj = spClass("lib_brand");
$GLOBALS['G_SP']['html']['file_root_name'] = $this->spArgs("html_file");
if( $results = $brandObj->findAll() ){
foreach($results as $values){
$url_name = strtolower($values['brand_name']).".html";
$urls[] = array(
array('goods','brand',array('id'=>$value['brand_id'])), $url_name
);
}
spClass('spHtml')->makeAll($urls);
$this->success("You have successfully created brands html files!");
}else{
$this->error("Failed to get available data!");
}
}else{
$this->error("Hacker Attack!");
}
}
2013-07-12 08:58:24