美好的一天!我总是收到此错误"(发生网站错误。很抱歉给您带来暂时的不便(",每次我尝试在邮递员中运行我的代码时。这是我的代码。
<?php
use PsrHttpMessageServerRequestInterface as Request;
use PsrHttpMessageResponseInterface as Response;
require '../vendor/autoload.php';
require '../includes/DBOperations.php';
$app = new SlimApp;
$app->post('/createClient', function(Request $request, Response $response){
if(!haveEmptyParameters(array('lastname','firstname','midname','contactnum','emailadd','password'),$response)){
$request_data = $request->getParseBody();
$lastname = $request_data['lastname'];
$firstname = $request_data['firstname'];
$midname = $request_data['midname'];
$contactnum = $request_data['contactnum'];
$emailadd = $request_data['emailadd'];
$password = $request_data['password'];
$hash_password = password_hash($password, PASSWORD_DEFAULT);
$db = new DBOperations;
@Dale关于添加以下 LOC 的评论有所帮助:
$config = ['settings' => ['displayErrorDetails' => true]];
$app = new SlimApp($config);