我有一個樣式問題需要或包含功能在PHP中。每當我包含一個php文件時,即使這個文件完全是空的,所有的頁面都會向下一行,從而導致頁面順序的破壞。包含文件後我檢查了源代碼,看起來代碼中沒有任何變化。我真的很困惑,這怎麼可能。我討厭這個網站的東西。php包括廢墟頁面佈局
這是一些代碼。問題是這些包括頂部。通過瀏覽器看到
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?php
include('database.php');
include('login.php');
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Web Design - Free CSS Templates</title>
<meta name="keywords" content="free css templates, web design, 2-column, html css" />
<meta name="description" content="Web Design is a 2-column website template (HTML/CSS) provided by templatemo.com" />
<link href="templatemo_style.css" rel="stylesheet" type="text/css" />
<!--////// CHOOSE ONE OF THE 3 PIROBOX STYLES \\\\\\\-->
<link href="css_pirobox/white/style.css" media="screen" title="shadow" rel="stylesheet" type="text/css" />
<!--<link href="css_pirobox/white/style.css" media="screen" title="white" rel="stylesheet" type="text/css" />
<link href="css_pirobox/black/style.css" media="screen" title="black" rel="stylesheet" type="text/css" />-->
<!--////// END \\\\\\\-->
</head>
<body>
<div id="templatemo_body_wrapper">
<div id="templatemo_wrapper">
<div id="tempaltemo_header">
<span id="header_icon"></span>
<div id="header_content">
<div id="site_title">
<a href="http://www.templatemo.com" target="_parent"><img src="images/templatemo_logo.png" alt="LOGO" /></a> </div>
<p>This is a free CSS website layout from templatemo.com website. Feel free to edit and apply for your websites. Duis vitae velit sed dui malesuad mollis aliquet ligula.</p>
<a href="#" class="detail float_r">Detail</a>
</div>
</div> <!-- end of header -->
模板的源代碼:http://www.text-upload.com/read,4081536104820
我編輯的代碼(沒有被編輯除了包括部分):http://www.text-upload.com/read,4081542128884
請顯示您的源代碼。然後,我們將能夠提供幫助。 – Hope4You
'database.php'和'login.php'中的內容 - 任何echo'd的空格或不包含在PHP標記中的HTML /空白行? – BenOfTheNorth
一般抱怨,如_「我討厭這個網站的東西」_和_「爲什麼低估我?」_通常只會導致更多的低價。此外,根據[常見問題](http://stackoverflow.com/faq),您有望成爲專業或發燒友程序員。 – Sparky