vercel не видит файл
есть вот такая проблема что у нас vercel не видит check.php перепробовал всё что можно!
https://php-project-5qty8jrdl-vitaluska123.vercel.app/
при отправке формы он не находит его...
vercel.json:
{
"version": 2,
"builds": [{ "src": "index.php", "use": "[email protected]" }],
"rewrites": [
{
"source": "/check.php",
"destination": "/check.php"
}
]
}
index.php:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Links</title>
<style type="css/stylesheat"> </style>
</head>
<body>
<form name="search" action="/check.php" method="post">
<input type="text" name="searchTxt" placeholder="Поиск">
<input type="submit" name="go" value="Найти">
</form>
<?php
require(__DIR__ . '/php/allVid.php');
$json = file_get_contents(__DIR__ . '/vid/vid.json');
$obj = json_decode($json, true);
vidCount($obj);
PrintVideo($obj);
?>
</body>
</html>
при этом он в гитхабе есть и сборка на vercel последняя

Ответы (1 шт):
Автор решения: Strunder
→ Ссылка
Решение оказалась простым для всех файлов и тп роуты прописать:
vercel.json
{
"functions": {
"api/*.php": {
"runtime": "[email protected]"
}
},
"routes": [
{ "src": "/check", "dest": "/api/check.php" },
{ "src": "/style.css", "dest": "/styles/index.css" },
{ "src": "/styleCheck.css", "dest": "/styles/check.css" },
{ "src": "/(.*)", "dest": "/api/index.php" }
]
}
