我想在wampserver 2.4上运行一些php代码,但是每次尝试在localhost上访问该文件时,我都会得到空白页。我已经尝试了在此站点上找到的所有内容(80端口,修改httpconfig),但它们没有起作用。当检查Apache日志错误时,我收到以下消息。我已经为此工作了几个小时。因此,您的帮助将不胜感激。提前致谢。 在以下php代码中:
php
<?php
ini_set(\'display_errors\', 1);
error_reporting(E_ALL);
;
try {
$response = array();
$username="root";
$pass="";
$dbh = new PDO('mysql:host=localhost;dbname=test', $username, $pass);
$name = "aina";
$email = "luaina.mada";
$mobile = "0324230671";
$result=$dbh->query("INSERT INTO students(`Name`,`Email`,`Mobile`)
VALUES ('$name','$email','$mobile')");
if($result){
$response['value']=1;
}else{
$response['value']=0;
}
}
catch (PDOException $e) {
print "Erreur !: " . $e->getMessage() . "<br/>";
die();
}
?>
[mpm_winnt:notice] [pid 5564:tid 380] AH00418: Parent: Created child process 3028
[Wed Apr 10 14:05:26.457486 2019] [mpm_winnt:notice] [pid 3028:tid 312] AH00354: Child: Starting 64 worker threads.
[Wed Apr 1014:06:56.344843 2019] [mpm_winnt:notice] [pid 5564:tid 380] AH00422:
Parent: Received shutdown signal -- Shutting down the server.