1
我的php代碼在本地服務器上正常工作,但不在web服務器上執行 部分代碼正在工作。 代碼被放棄,請告訴我代碼的問題。php代碼跳過一些html內容
<?php
include("/connect.php");
session_start();
$_SESSION['title']="Portfolio | Mactros Inc.";
include("header.php");
?>
<div>
<center>
<font size=7 class="top">
Portfolio<br />
</font>
<font style="color: #aeafb1;"><a href="index.php" style="color: #aeafb1;">Home</a> -> Portfolio</font>
</center>
</div>
<div style="height: 650px; margin-top: 10px;">
<?php
$sql = "select * from project";
$result = $conn->query($sql);
while($row = $result->fetch_assoc()){
?>
<div class="portfolio">
<center>
<img src="<?php echo $row["pic"]; ?>" class="port">
<font size=5><?php echo $row["name"];?></font><br>
<font><?php echo $row["type"];?></font>
</center>
</div>
<?php }?>
</div><?php include("footer.php");?>
在此代碼
得到執行其他被忽略
<?php
include("/connect.php");
session_start();
$_SESSION['title']="Portfolio | Mactros Inc.";
include("header.php");
?> <div>
<center>
<font size=7 class="top">
Portfolio<br />
</font>
<font style="color: #aeafb1;"><a href="index.php" style="color: #aeafb1;">Home</a> -> Portfolio</font>
其他頁面正在運行良好 – sahib
thanx it works – sahib