sfcode An Online Competing and Development Environment

Variables
get_file.php File Reference

## 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

## Detailed Description

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.

## Variable Documentation

## ◆ else

if (file_exists( $path)) else

Initial value:
{
http_response_code(404)