这对我来说是个谜。我在这里有一个Html代码块,并且我希望记录可以使用php循环使用。现在,当我添加一个php代码时,即使在视图源代码中,所有下面的php都没有了。我不知道发生了什么。当我把php放在最下面的时候,所有东西都显示出来了,当我把php放在中间时,只有上面的html出现在视图源中。当我放置一个php代码时,html标记消失
<?php include('incl/connect.php'); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Admin</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/reset.css">
<link rel="stylesheet" type="text/css" href="../css/style2.css">
<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:700,300,300italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="../css/tables.css">
<!--[if lt IE 9]>
<style>
.content{
height: auto;
margin: 0;
}
.content div {
position: relative;
}
</style>
<![endif]-->
</head>
<body>
<div class="container">
<section class="tabs">
<input id="tab-1" type="radio" name="radio-set" class="tab-selector-1" checked="checked" />
<label for="tab-1" class="tab-label-1">Home</label>
<input id="tab-2" type="radio" name="radio-set" class="tab-selector-2" />
<label for="tab-2" class="tab-label-2">Repairs</label>
<input id="tab-3" type="radio" name="radio-set" class="tab-selector-3" />
<label for="tab-3" class="tab-label-3">yet</label>
<input id="tab-4" type="radio" name="radio-set" class="tab-selector-4" />
<label for="tab-4" class="tab-label-4">yet</label>
<div class="clear-shadow"></div>
<div class="content">
<div class="content-1">
<p>Search <input type="search" placeholder="Search"></p>
<input type="checkbox" checked="checked">All
<input type="checkbox" >Female only
<input type="checkbox" >Male only
<table cellspacing='0'> <!-- cellspacing='0' is important, must stay -->
<!-- Table Header -->
<thead>
<tr>
<th>Username</th>
<th>Fullname</th>
<th>Status?</th>
<th>Remaining time</th>
<th>Expires</th>
<th>Active</th>
</tr>
</thead>
<!-- Table Header -->
<!-- Table Body -->
<tbody>
<?php $query = $conn->query("SELECT * FROM client");
$member = $query->fetch(PDO::FETCH_ASSOC); ?>
<tr>
<td><?php echo $member['nick']; ?></td>
<td>here </td>
<td></td>
</tr><!-- Table Row -->
</tbody>
<!-- Table Body -->
</table>
</div><!--- content-1 end -->
<div class="content-2">
<h2>Repairs</h2>
</div><!-- content- end-->
<div class="content-3">
<h2>soon</h2>
<p></p>
</div><!--content-3 end-->
<div class="content-4">
<h2>sooon</h2>
<p></p>
</div><!--- content-4 end -->
</div>
</section>
</div>
</body>
</html>
没有源代码,你能提供吗? – tomirons
请显示相应的HTML/PHP代码。没有任何显示,我们无法提供帮助。 –
ops。抱歉。^_^ – yul757