<NME> loader.php
<BEF> <?php
define('APP_TIME_START', microtime(true));
define('IPHP_PATH', dirname(__FILE__));
include_once(dirname(__FILE__) . '/functions.php');

mb_internal_encoding("UTF-8");

$AUTOLOAD_PATH =  array(
	dirname(__FILE__) . '/framework',
	APP_PATH . '/models',
	APP_PATH . '/classes',
);

spl_autoload_register(function ($cls){
	global $AUTOLOAD_PATH;
	foreach($AUTOLOAD_PATH as $dir){
		$file = $dir . '/' . $cls . '.php';
		if(file_exists($file)){
			require_once($file);
			return;
		}
	}
	// 有很多代码会使用 class_exists(), 需要和它们兼容, 所以不能在这里 throw
#	if(!class_exists($cls, false)){
#		throw new Exception("Class $cls not found!");
#	}
});

// init application
App::init();

		if($act == 'new'){
			$act = 'create';
		}
		$paths[] = array(
			'base' => join('/', $ps),
			'action' => 'index',
				'base' => join('/', $ps) . '/index',
				'action' => 'index',
			);
		}
	}
	return $paths;

<MSG> udpate

<DFF> @@ -32,6 +32,10 @@ function include_paths(){
 		if($act == 'new'){
 			$act = 'create';
 		}
+		$paths[] = array(
+			'base' => join('/', array_slice($ps, 0, -1)),
+			'action' => $act,
+		);
 		$paths[] = array(
 			'base' => join('/', $ps),
 			'action' => 'index',
@@ -41,6 +45,10 @@ function include_paths(){
 				'base' => join('/', $ps) . '/index',
 				'action' => 'index',
 			);
+			$paths[] = array(
+				'base' => join('/', array_slice($ps, 0, -1)) . '/index',
+				'action' => $act,
+			);
 		}
 	}
 	return $paths;

udpate