Zend的常用语法
獲取參數
Tool::getSafeText($this->getRequest()->get('ordertype'));//文本入庫前的過濾工作 Tool::getSafeText public static function getSafeText($textString, $htmlspecialchars = false) {if(!get_magic_quotes_gpc()) $textString = addslashes($textString);return $htmlspecialchars ? htmlspecialchars(trim($textString),ENT_QUOTES) : trim(strip_tags($textString)); }取回執行數據
$this->getAdapter()->fetchRow($sql_total); $this->getAdapter()->fetchAll($sql);別的模型的方法
$cates = $this->model('Api_Model_Sgp')->getCagtes($row);自己對應模型的方法
protected $_modelName = "Api_Model_Sagnd"; $new_weeks = $this->_model->getDateLabel();?
總結