source:
uz/php/upload.php
| Last change on this file was 64249d6, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 366 bytes | |
| Rev | Line | |
|---|---|---|
| [64249d6] | 1 | <?php |
| 2 | ||
| 3 | header('content-type: application/json'); | |
| 4 | header('Access-Control-Allow-Origin: *'); | |
| 5 | ||
| 6 | if($_FILES['file']['name'] == 'err.html') { | |
| 7 | http_response_code(404); | |
| 8 | ||
| 9 | echo json_encode([ | |
| 10 | 'status' => 'error', | |
| 11 | 'file' => $_FILES['file']['name'] | |
| 12 | ]); | |
| 13 | } | |
| 14 | else | |
| 15 | echo json_encode([ | |
| 16 | 'status' => 'ok', | |
| 17 | 'file' => $_FILES['file']['name'] | |
| 18 | ]); |
Note:
See TracBrowser
for help on using the repository browser.
![(please configure the [header_logo] section in trac.ini)](/pub/chrome/site/your_project_logo.png)