Spaces:
Sleeping
Sleeping
Create index.php
Browse files
index.php
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
// Step 1: A simple JSON response
|
| 3 |
+
header('Content-Type: application/json');
|
| 4 |
+
header('Access-Control-Allow-Origin: *'); // Critical for Cloudflare to talk to this backend
|
| 5 |
+
|
| 6 |
+
echo json_encode([
|
| 7 |
+
"status" => "success",
|
| 8 |
+
"message" => "Hello from PHP on Hugging Face!",
|
| 9 |
+
"php_version" => phpversion()
|
| 10 |
+
]);
|
| 11 |
+
?>
|