iThome online | iThome Blog | iThome周刊訂閱

載入中...

kane18456

IT邦初學者
10級

請問我用php的include語法問題
標籤:php include

請問我用php的include語法問題
原始碼如下:
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5" />
<title>無標題文件</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style></head>

<body>
<table width="100%" border="0" align="center">
<tr>
<td><?php echo include("top01.php")?></td>
</tr>
<tr>
<td><?php echo include("top02.php")?></td>
</tr>
</table>
<table width="100%" border="0">
<tr>
<td width="14%"><table width="100%" border="0">
<tr>
<td><?php echo include("left01.php")?></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table></td>
<td width="86%"><?php echo include("main01.php")?></td>
</tr>
</table>
</body>
</html>
出來的畫面卻會後面有個數字1 不知為什麼 原始碼並沒有看到

收藏到:發佈到twitter       
解決時間:2008-08-19 09:29:05
發問時間:2008-08-06 08:57:34

圖片沒有出來,又無法修改,所以我另外貼了圖片的網址
http://photo.pchome.com.tw/_manage/my_pic.html?s=s08&n=kane18456&b=27&p=121798415716

2008-08-06 08:59:43 補充

最佳解答(發問者自選)
11

回答:fillano ( IT邦好手4級 )

時間:2008-08-06 09:28:58

include()前面不用加echo啦....

我想是因為include成功會回傳1,所以你前面加了echo,就把這個return value也一起顯示出來了。

[-隱藏]

回應

kane18456 說:

謝謝你 解決了 就是他了 ^^b

2008-08-06 21:54:15

請問我用php的include語法問題

目前沒有回答

回應

請填寫您的回應,長度限為1,000個字,回應不計點數,也不限使用次數



 

檢舉違規

違規事項:

*補充檢舉理由(可省略),字數不可超過100字

推薦

推薦理由:


*給回答者的鼓勵(可不填),字數不可超過100字

熱門標籤


free counters