何らかの理由で、HTMLファイルに埋め込まれたPHPスクリプトが自分のコンピュータで実行されません。xamppを使用してPHPを実行しない
私はXAMPPをLinuxにインストールしました。このFAQのこの最初の質問の手順を使用しています:https://www.apachefriends.org/faq_linux.html(外部サイトへのリンク)外部サイトへのリンク。
私はコマンドを使用してそれを設定している場合:/ opt/LAMPP/LAMPP
を開始し、私は戻ってメッセージを取得します。Linux 7.1.7-0のためのXAMPP ... XAMPPの開始:Apacheの起動.. 。OK。 XAMPP:MySQLの起動... okです。 XAMPP:ProFTPDを起動しています...
なぜ私はPHPの代わりにPRoFTPDを開始することについてのメッセージを得るのか分かりません。私はそれがその一部であるかもしれないと思います。
次は私のHTMLファイルです:
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset = "utf-8">
<title>CS80 Final</title>
<link rel = "stylesheet" type ="text/css" href = "final.css" />
<!-- <script type = "text/javascript">
</script> -->
</head>
<body>
<h1 id ="title"> <bold> Garden Exchange </bold> </h1><!-- Title of the page-->
<section> <!-- Section regarding making a selection -->
What type of plant are you looking for?
<input type = "text" id = "plant"/>
<input type = "button" id = "plantbutton" value = "Find plant"/><br>
<br/> <br/>
Looking to list a plant instead?
<input type = "button" id = "input button" value = "List a plant"/>
</section>
<?php
$nam = array("Bob", "Willow", "sagment lamp");
if (preg_match("/low/",$nam))
{
print ("<p> 'low' was found </p>");
}
?>
<section id ="listings" style: hidden="hidden">
</section>
<section id = "listing" style: hidden = "hidden">
</section>
</body>
</html>
私は私が得ることができるすべての助けに感謝します!
エラー報告機能がオフになっているため、構文エラーは明白ですが、表示されません。それをオンにすると、何が間違っているかがわかります。 –
どうすればいいですか? –
質問の先頭にあるリンクを見てください –