Reuse dashboard template in php

1

Dear I have a template in html that I use as a dashboard and I have it in several forms, I wanted to know how I can have it in an .html file and be able to reuse it when I modify it once it is changed in all the files and I do not have that I change it every time in each page since it makes it little maintainable, I'm using html and php.

this is the dashboard code

<div class="col-sm-3 col-md-2 sidebar">
        <div style="margin-top: 50px";></div>
        <ul class="nav nav-sidebar">

            <li class="active"><a href="Index.php">Ingreso de Visitas</a></li>
            <li ><a href="ListaRegistroActivo.php">Registrar Salida <span class="sr-only">(current)</span></a></li>
            <li><a href="VisitaSalida.php">Lista de Salida</a></li>

            <li class="nav-item" data-toggle="tooltip" data-placement="right" title="Components">
                <a class="nav-link nav-link-collapse collapsed" data-toggle="collapse" href="#collapseComponents" data-parent="#exampleAccordion">
                    <i class="fa fa-fw fa-wrench"></i>
                    <span class="nav-link-text">Reportes</span>
                </a>
                <ul class="sidenav-second-level collapse" id="collapseComponents">
                    <li>
                        <a href="../Reportes/ReporteDiario.php"><i class="glyphicon glyphicon-calendar">&nbsp;</i>Diario</a>
                    </li>
                    <li>
                        <a href="../Reportes/PorRangoFecha.php"><span class="glyphicon glyphicon-hourglass" >&nbsp;</span>Por  Fecha</a>
                    </li>
                </ul>
            </li>

        </ul>
    </div>

Greetings friends and thanks

    
asked by Pablo Moraga 05.09.2017 в 14:48
source

1 answer

1

In PHP, use require , ahem:

<body>
Otros html
...
<?php
require("mi_otra_pagina.php");
require("mi_otra_pagina_html.html");
?>
</body>
    
answered by 05.09.2017 / 17:46
source