public function systemConfig() { $sc = new SystemConfig(); $workRoot = trim(Input::get('workRoot')); // if (File::isWritable($workRoot)) { // $sc->set(SystemConfig::WORK_ROOT_FIELD, $workRoot); // } else { // return Response::json(array( // 'res' => 1, // 'errMsg' => 'Work Root目录不可写!', // )); // } $sc->set(SystemConfig::WORK_ROOT_FIELD, $workRoot); return Response::json(array('res' => 0, 'write' => File::isWritable($workRoot))); }