1

回答: Web ホスティングに問題がありました。

これは私のコードです

<!DOCTYPE html> 
<html lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
        <meta name="description" lang="en" content="Test Website " /> 
        <meta name="author" content=""> 
        <link rel="stylesheet" type="text/css" href="css/style.css">
        <title</title>
    </head>
    <body>
        <section id="wrapper">
            <?php include('includes/topHeader.php'); ?>
            <?php include('includes/leftSide.php'); ?>
            <?php include('includes/middleSide.php'); ?>
            <?php include('includes/rightSide.php'); ?>
        </section>

        <?php include('includes/foot.php'); ?>
        </section>
    </body>
</html>

他のphpファイルがメインページに表示されないことに疑問がありますか?

それを作成するために、私はこのウェブサイトを使用しました http://www.1stwebdesigner.com/css/how-to-create-php-website-template/

ビューのソースを更新すると、次のように表示されます。

<section id="wrapper">

<!--?php include('../includes/topHeader.php'); ?-->
<!--?php include('../includes/leftSide.php'); ?-->
<!--?php include('../includes/middleSide.php'); ?-->
<!--?php include('../includes/rightSide.php'); ?-->

</section>

<!--?php include('../includes/foot.php'); ?-->
4

2 に答える 2

1

関数を正しく使用しているincludeため、次のことを確認してください。

  • 含めようとしているファイルは実際に存在します。file_exists関数でテストできます
  • ファイルのどこかに、プログラムの実行を停止させる致命的なエラーはありません (エラー ログを確認できます)。
  • マークアップが適切にフォーマットされている (場合によっては、コードが正しくフォーマットされていない場合、ブラウザーはページを正しくレンダリングできません)
于 2013-07-03T16:07:03.280 に答える