I'm trying to run a simple PHP code in Vercel (PHP is in the folder 'api'), it opens the HTML code but when it calls the index.php give me the error:
PHP Built-In Server HTTP error: Error: connect ECONNREFUSED 127.0.0.1:8000
my html :
<!DOCTYPE html>Testando php no vercel
Bem vindo ao meu site
Digite seu nome: Enviarmy PHP:
<?php // Verifica se o nome foi enviado via POST if (isset($_POST['nome'])) { $nome = $_POST['nome']; echo " # Bem-vindo ao meu site, $nome! "; } else { header("Location: /index.html"); exit(); } my vercel.json:{ "functions": { "api/index.php": { "runtime": "vercel-php@0.7.1" } }, "routes": [ { "src": "/api/index.php", "dest": "/api/index.php" }, { "src": "/(.*)", "dest": "/index.html" } ] }