当我想在服务器上测试我的文件时,我收到了一个错误(500 内部服务器错误)。mamp(本地)一切正常,我没有收到任何错误。这是有错误的代码。
<?php
include_once('../classes/places.class.php');
try
{
$oPlace = new Places();
$oPlace->Street = $_POST['place'];
$oPlace->HouseNumber = $_POST['number'];
$oPlace->Name = $_POST['Name'];
if($oPlace->placeAvailable())
{
$feedback['status'] = "success";
$feedback['available'] = "yes";
$feedback["message"] = "Go ahead, street is available";
}
else
{
$feedback['status'] = "success";
$feedback['available'] = "no";
$feedback["message"] ="De zaak " . "'" . $_POST['name'] . "'". " is reeds op dit adres gevestigd." ;;
}
}
catch(exception $e)
{
$feedback['status'] = "error";
$feedback["message"] =$e->getMessage();
}
header('Content-type: application/json');
echo json_encode($feedback);
?>