sfcode
An Online Competing and Development Environment
|
Variables | |
$postData = file_get_contents("php://input") | |
$uname = $postData['username'] | |
$f_path = $postData['file_path'] | |
$path = "../users/" . $uname . "/" . $f_path | |
if(file_exists($path)) | else |
This script uses the username and file path in the user's workspace to return the contents in the requested file (code file). If the file path is not found on the server, a 404 HTTP error is raised.
if (file_exists( $path)) else |