冒着被否决票的风险,我会问这个问题,看看是否有人可以帮助我。我已经盯着这个看了一段时间,我无法弄清楚。
解析错误:语法错误,意外的 '' (T_ENCAPSED_AND_WHITESPACE),第 130 行需要标识符 (T_STRING) 或变量 (T_VARIABLE) 或数字 (T_NUM_STRING)
function pdf($type=null){
//get default or create a type
$data = $this->storeSessionData(
array(),
'SalesComp',
$this->variables
);
$type = ($type)? $type : $data['type']; //this is line 130
$this->set('data', $this->report('store', 'year', 3, $type));
$this->set(
'districtTitle',
array('N' => 'North', 'S' => 'South')
);
$districts = $this->Store->find(
'list',
array(
'fields' => array('Store', 'District'),
'conditions' => array('NOT' => array('District'=> 'O')
)
)
);
$this->set('districts', $districts);
$supervisor = $this->Store->find(
'list',
array('fields' => array('Store','Supervisor'),
'conditions' => array('NOT' => array('District'=> 'O')
)
)
);
$this->set('supervisor', $supervisor);
$this->set(
'supervisors',
$this->Supervisor->find(
'list',
array('fields' => array('Supervisor','ShortName')
)
)
);
$title = ($type == 'sales')?
'Sales Comparison Report':'Fuel Comparison Report';
$this->set('title', $title);
$this->layout = 'pdf';
$this->render();
}