Php 在导航栏和垂直菜单之间包括
我目前正在创建我的第一个网站,我遇到了一些麻烦,我想在导航栏和垂直栏之间包含一个页面,我想在单击垂直栏的按钮时更改为包含页面。这是一个屏幕: 这是我的代码:Php 在导航栏和垂直菜单之间包括,php,html,css,Php,Html,Css,我目前正在创建我的第一个网站,我遇到了一些麻烦,我想在导航栏和垂直栏之间包含一个页面,我想在单击垂直栏的按钮时更改为包含页面。这是一个屏幕: 这是我的代码: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Memeable | The 1# world meme generator</title> <link href
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Memeable | The 1# world meme generator</title>
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<link href="css/bootstrap-social.css" rel="stylesheet">
</head>
<body>
<div >
<?php
include("head.php");
?>
</div>
</body>
Memable |世界第一模因生成器
这是我的head.php:
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Memeable</a>
<a href="http://www.facebook.com" class="fa fa-facebook "></a>
<a href="http://www.twitter.com" class="fa fa-twitter "></a>
</div>
</div>
</nav>
<div class="vertical-menu">
<a href="#" class="" id = "first">Premier</a>
<a href="#" class = "">Deuxième</a>
<a href="#" class = "">Troisième</a>
<a href="#" class = "">Quatrième</a>
</div>
我确信解决办法很简单,但我不知道怎么做。
谢谢你的帮助 要在“内容区域”中显示您的内容,请使用。提供要作为参数加载的文件名。使用数组指定要使用的所有有效文件,然后使用参数选择要加载的正确子页面
<?php
$files = array();
$files['home'] = 'home.php';
$files['contact'] = 'contact.php';
$files['whatever'] = 'you_want.php';
?>
要在“内容区域”中显示您的内容,请使用。提供要作为参数加载的文件名。使用数组指定要使用的所有有效文件,然后使用参数选择要加载的正确子页面
<?php
$files = array();
$files['home'] = 'home.php';
$files['contact'] = 'contact.php';
$files['whatever'] = 'you_want.php';
?>
您想在单击按钮时显示head.php吗?什么按钮?是单页应用程序吗?当垂直菜单的按钮(“Premier、deuxième等…”时如果它是一个单页应用程序更好,但不是必需的head.php将仅在您单击premier等链接时显示。正确吗?您希望在单击按钮时显示head.php吗?什么按钮?它是一个单页应用程序吗?当垂直菜单的按钮(“premier,deuxième等…”时如果它是一个单页应用程序就更好了,但不是必需的head.php只有在您单击premier等链接时才会显示。正确吗?
<ul>
<li><a href="index.php?nav=home">Home</a></li>
<li><a href="index.php?nav=contact">Contact</a></li>
</ul>