Say I have a simple CSS layout, and my menu is a column on the side. This menu will be placed on each web page (about 10 web pages). If I have elements in this menu in the form of links, etc., How can I make it so that if I add a link to one page, it will add it to all pages? Would you just make it a PHP page and in that element <div>include a PHP file called a menu or something else and just edit that PHP file (so I only need to edit this file, not every web page)?
<div>
If this is raw PHP (without frameworks), you just turn it on.
include('sidebar.php');
, , . foo, , example.com/foo/somefile.php, include include('../sidebar.php');, , sidebar.php .
foo
example.com/foo/somefile.php
include('../sidebar.php');
sidebar.php
, .
, , :
<?php include("/yourMenu.php"); ?>
yourMenu.php , .
, . include php
include
- Apache, (ssi). .
: http://httpd.apache.org/docs/2.2/howto/ssi.html
Source: https://habr.com/ru/post/1758481/More articles:how to configure ip system programmatically - c ++C # The last element of a list is listXNA 4.0 для xbox вопрос (путать) - c#folderbrowserdialog on winforms C # - c #Can Haskell Text.Json package read but not write Rationals? - jsonopen a new window and write to him in the development of the Firefox extension - javascriptТегявляется элементом уровня блока в XHTML? - htmlHow to remove curly quotes? - pythonесть все равно, чтобы увеличить визуальную студию 2010, если у вас нет прокрутки на вашей мыши - visual-studio-2010How to allow iPhone 4 only to use the application because it uses the front camera - iphoneAll Articles
является элементом уровня блока в XHTML? - html