Layout.php没有显示header.php部分 [英] Layout.php is not showing the header.php part

查看:224
本文介绍了Layout.php没有显示header.php部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有下面的HTML。

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <!-- Meta, title, CSS, favicons, etc. -->
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
    </head>
    <body style="background:#F7F7F7;">
        <div class="">
        </div>
    </body>
</html>

我把这个html分成两个PHP文件。所以。 Header.php

I divided this html in two PHP files. So.There is Header.php. Like Below.

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>

Layout.php

<!DOCTYPE html>
<html lang="en">

    <? include 'header.php';?>

    <body style="background:#F7F7F7;">
        <div class="">
        </div>
    </body>
</html>



问题



Layout.php显示header.php部分。

Problem

Layout.php is not showing the header.php part.

推荐答案

我认为问题是短标签,

<?php include 'header.php';?>

但我会说,在codeigniter使用中,

But i would say, in codeigniter use,

$this->load->view("header.php");

这篇关于Layout.php没有显示header.php部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆