New ProjectCD "needs to build the root directory of the project"
composer create-project laravel/laravel=4.2.* “项目名” --prefer-dist
Deployment Projectphp-s localhost: "Port number"-T Public
Loading the custom class folderLocate the Composer.json defined in the
"AutoLoad": { "Classmap": [ "Database" , "App/library/class" ], "psr-4": { "app\\": " app/" } },
Execute composer Dumpautoload
Log extension
classsplogger{//all logs are required to be registered here. ConstLog_error = ' ERROR '; ConstLog_info = ' INFO '; ConstLog_debug = ' DEBUG '; ConstLog_sql = ' SQL '; Private Static $loggers=Array(); //get an instance Public Static functionGetLogger ($type= Self::log_error,$day= 30) { if(Empty(Self::$loggers[$type]) { self::$loggers[$type] =NewWriter (NewLogger ($type));//Self :: $loggers [$type]->usedailyfiles ('/usr/local/spmanaplat '. /logs/'. $type. " Log ', $day);Self::$loggers[$type]->usedailyfiles (Storage_path (). ' /logs/'.$type.‘. Log ',$day); } $log= Self::$loggers[$type]; return $log; }}
Classpublicapi{ Public Static function Log($log _string) {//$action = route::current ()->getactionname ()//List ($class, $method) = explode (' @ ', $action);//String split $log= [ ' Message ' =$log _string,//message' url ' = = Request::url (),//Current Address' Input ' = Input::all (),//Input Parameters' Time ' =Date(' y-m-d h:i:s '),//Time ]; Splogger:: GetLogger (Splogger::log_debug)->debug ($log); }}
Laravel Command Memo