2008-7-24 17:05
eco
?veiw=1 可以show到1.htm?
我有
1.htm
2.htm
10.htm
如何用index.php?veiw=1
show到1.htm?
1.htm上面
仲要包含埋header.htm
下面footer.htm
2008-7-24 17:47
Sam2
<?php
include_once("header.htm");
if($view==1)
{
include_once("1.htm");
}
include_once("footer.htm");
?>
最簡單既辦法-.-
2008-7-24 20:14
eco
read.php
<?
$read = $_GET[view];
if ($read <1 OR $read >10) {
include '.$read."."htm';
include 'footer.htm';
}
?>
folder內含
read.php
1.htm
-
10.htm
footer.htm
header.htm
我用xxx/read.php
入去
Warning: main(teach/.$read."."htm) [function.main]: failed to open stream: No such file or directory in //read.php on line 4
Warning: main(teach/.$read."."htm) [function.main]: failed to open stream: No such file or directory in //read.php on line 4
Warning: main() [function.include]: Failed opening 'teach/.$read."."htm' for inclusion (include_path='.:/usr/local/lib/php') in //read.php on line 4
[[i] 本帖最後由 eco 於 2008-7-24 20:36 編輯 [/i]]
2008-7-25 17:34
hamu278
1. 錯區
[url]http://www.alan888.com/Discuz/forum-47-1.html[/url]
2. 試
[code]
<?php
include ('header.htm');
include ($_GET['view'].'.htm');
include ('footer.htm');
?>
[/code]
頁:
[1]
Powered by Discuz! Archiver 5.5.0
© 2001-2006 Comsenz Inc.