城市园林绿化_共创市园林绿化建设绿色文明家园

城市园林绿化_共创市园林绿化建设绿色文明家园

城市园林绿化汇集市园林、自然园林和一些有关绿色文明建设信息资讯,园林绿化促进城市经济和社会系统的健康和活力,随着经济发展和社会繁荣,园林绿化事业的地位和社会需求将不断提高。

菜单导航

系统出现异常

作者: 城市园林绿化 发布时间: 2020年11月05日 02:35:41

异常位置: FILE: /alidata/www/zhushi2019/coolphp/controller.php LINE: 14

[ 提示信息 ]

[posts]控制器中没有找到可执行的动作[index]!

[ 详情 ]

请求网址:/index.php
12: */
13:
14: class Controller extends Base{ public $app; public $name = 'Controller'; public $action = 'Index'; public $view; public $result = array(); public $error; protected $beforeFilter = array(); protected $endFilter = array(); public static function loadController($name){ $class = c('controller_prefix').$name . c('controller_suffix'); $dir = c('controller_dir'); if(import( $dir.'/'.$class ) && class_exists($class) ){ $cotroller = new $class(g('__app')); return $cotroller; }else{ throw new CLException( 'ControllerNotFound',$name ); } } public function __construct($app){ $this->app = $app; $this->name = $this->app->controllerName; $this->action = $this->app->actionName; $this->init(); } public function init(){ } public function getActionName($name=null) { if($name==null) $name = $this->action; return $name; } public function exec($action=null,$param=array()){ $this->action = !empty($action) ? $action : $this->action; if(!empty($this->beforeFilter))$this->doFiter($this->beforeFilter); $action = $this->getActionName(); if( method_exists( $this,$action) ){ if(empty($this->error)){ $result = call_user_func_array( array( $this, $action ),$param); $this->assign($result); } }else{ $this->__empty(); } if(!empty($this->endFilter)){ $this->doFiter($this->endFilter); } } function assign($field,$data=null){ if(empty($field)) return; if(!is_array($field)){ $field = empty($data) ? array( '__result'=>$field ) : array($field=>$data); } foreach( $field as $key=>$val){ $this->result[$key] = $val; } } public function msg($msg,$redirect=null,$extra=array()){ $extra['msg'] = $msg; $extra['redirect'] = $redirect; $this->result = $extra; $this->error = $msg; $this->view = 'message'; return false; } public function __empty(){ throw new CLException('MissAction',$this->name,$this->action); } public function doFiter($filters){ if(empty($filters)){ return; } foreach($filters as $method=>$setting){ $function =false; if(is_array($setting)){ $except = isset($setting['except']) ? (is_string($setting['except']) ? explode(',',$setting['except']) :$setting['except'] ) : array(); $only = isset($setting['only']) ? (is_string($setting['only']) ? explode(',',$setting['only']) :$setting['only'] ) : array(); if( $except && !in_array( $this->action,$except ) ){ $function = $method; }elseif($only && in_array($this->action,$only) ){ $function = $method; } }else{ $function = $setting; } if( $function ){ if( $this->doRun($function)===false ) break; } } } public function doRun($action,$obj=null,$param=array()){ if(function_exists($action)) return call_user_func_array($action,$param); if(is_string($obj) && import($obj) ){ $className = strrchr($obj,'/'); if($className===false) $className = $obj; else $className = substr($className,$className+1); if($param){ $reflection = new ReflectionClass($className); $obj = call_user_func_array( array(&$reflection, 'newInstance'), $param ); }else{ $obj = new $className(); } }else{ $obj = $this; } if(method_exists($obj,$action)){ return call_user_func_array( array( $obj,$action ),$param ); } return false; } public function __destruct() { $this->app = null; } } ?>15:16:

本文地址:http://www.hgylj.com/sj/43246.html

请遵守互联网相关规定,不要发布广告和违法内容

城市园林绿化_共创市园林绿化建设绿色文明家园