私はそれを正しくすることができないようです。基本的に、3 つの PHP ファイルが使用されます。 - login.php、testconnect.php、および numrows.php numrows.php は、最初に再生を開始するメイン ファイルです。
login.php と testconnect.php は良いです。
numrows.php:-
<?php
global $dbh1;
require_once "testconnect.php";
try
{
$stmt = $dbh1->prepare("select count(distinct mfg_code) from test");
$stmt->execute();
}
catch(PDOException $err)
{
$alertmsg = $err->getMessage();
}
$num = $stmt->fetch("PDO::FETCH_ASSOC:");
$num = json_encode($num);
echo $num;
?>
Apache からのログ エラーは、""GET /testnumcards.php HTTP/1.1" 500 -" を示していました。ここでも、デバッグ中に発生したエラーは「NetworkError: 500 Internal Server Error」です。どうするのが正しい方法ですか?