本文整理匯總了PHP中CUtils::showError方法的典型用法代碼示例。如果您正苦於以下問題:PHP CUtils::showError方法的具體用法?PHP CUtils::showError怎麽用?PHP CUtils::showError使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CUtils
的用法示例。
在下文中一共展示了CUtils::showError方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setTableFields
private function setTableFields()
{
try {
if ($this->props['is_system']) {
$this->readConfig();
} else {
$this->readDBConfig();
}
} catch (Exception $e) {
echo CUtils::showError($e->getMessage());
}
if ($this->props['is_sort']) {
$this->fields['ord'] = array('name' => 'ord', 'title' => 'Сорт.', 'type' => 'number', 'width' => '5%', 'defvalue' => '500', 'group_update' => true);
}
if ($this->props['is_publish']) {
$this->fields['publish'] = array('name' => 'publish', 'title' => 'Акт.', 'type' => 'checkbox', 'search' => true, 'group_update' => true, 'width' => '1%');
}
if ($this->props['is_lang']) {
$this->fields['lang'] = array('name' => 'lang', 'title' => 'Язык', 'type' => 'string', 'readonly' => true);
}
$this->fields['credate'] = array('name' => 'credate', 'title' => 'Дата создания', 'type' => 'datetime', 'readonly' => true);
$this->fields['change_date'] = array('name' => 'change_date', 'title' => 'Дата изменения', 'type' => 'datetime', 'readonly' => true);
foreach ($this->fields as $k => $f) {
$this->fields[$k]['cls'] = $this->getDBTableName();
}
}
示例2: callMethod
function callMethod($sComponentName = 'tree', $sMethodName = 'index', $aParams = array())
{
try {
return $this->callMethodInstance($this->getMethodInstance($sComponentName, $sMethodName), $aParams);
} catch (Exception $e) {
echo CUtils::showError($e->getMessage());
exit;
}
}