"success", "content" => $content)); } else { echo '{"status":"error","message":"Missing Parameter!"}'; } break; default: echo '{"status":"error","message":"No Type"}'; break; } function getWorkspacePath($path) { //Security check if (!Common::checkPath($path)) { die('{"status":"error","message":"Invalid path"}'); } if (strpos($path, "/") === 0) { //Unix absolute path return $path; } if (strpos($path, ":/") !== false) { //Windows absolute path return $path; } if (strpos($path, ":\\") !== false) { //Windows absolute path return $path; } return WORKSPACE . "/".$path; } ?>