作者quota (找房子..伤脑筋)
看板PHP
标题[请益] 请教FastTemplate
时间Sat Mar 3 17:29:01 2007
这也是一个旧的网页,使用到FastTemplate
刚拷贝过去时可以使用,可是後来出现了错误讯息如下
Warning: main(./includes/session.php): failed to open stream: No such file or directory in /home2/www/sports/index.php on line 4
Warning: main(): Failed opening './includes/session.php' for inclusion (include_path='.:/usr/local/lib/php') in /home2/www/sports/index.php on line 4
Warning: main(./includes/config.php): failed to open stream: No such file or directory in /home2/www/sports/index.php on line 5
Warning: main(): Failed opening './includes/config.php' for inclusion (include_path='.:/usr/local/lib/php') in /home2/www/sports/index.php on line 5
Warning: main(./includes/template.php): failed to open stream: No such file or directory in /home2/www/sports/index.php on line 6
Warning: main(): Failed opening './includes/template.php' for inclusion (include_path='.:/usr/local/lib/php') in /home2/www/sports/index.php on line 6
Warning: main(./includes/db.php): failed to open stream: No such file or directory in /home2/www/sports/index.php on line 7
Warning: main(): Failed opening './includes/db.php' for inclusion (include_path='.:/usr/local/lib/php') in /home2/www/sports/index.php on line 7
Warning: main(./hotels/includes/salon-header.php): failed to open stream: No such file or directory in /home2/www/sports/index.php on line 9
Warning: main(): Failed opening './hotels/includes/salon-header.php' for inclusion (include_path='.:/usr/local/lib/php') in /home2/www/sports/index.php on line 9
Warning: main(./hotels/includes/salon-top.php): failed to open stream: No such file or directory in /home2/www/sports/index.php on line 10
Warning: main(): Failed opening './hotels/includes/salon-top.php' for inclusion (include_path='.:/usr/local/lib/php') in /home2/www/sports/index.php on line 10
Warning: main(./hotels/includes/salon-menu.php): failed to open stream: No such file or directory in /home2/www/sports/index.php on line 11
Warning: main(): Failed opening './hotels/includes/salon-menu.php' for inclusion (include_path='.:/usr/local/lib/php') in /home2/www/sports/index.php on line 11
Fatal error: Cannot instantiate non-existent class: template in /home2/www/sports/index.php on line 13
而我的 index.php语法如下:
<?php
$root_path = "./";
include ($root_path . "includes/session.php");
include ($root_path . "includes/config.php");
include ($root_path . "includes/template.php");
include ($root_path . "includes/db.php");
include ($root_path . "hotels/includes/salon-header.php");
include ($root_path . "hotels/includes/salon-top.php");
include ($root_path . "hotels/includes/salon-menu.php");
$template = new Template("templates/");
$template->set_filenames(array(
'body' => 'index.tpl')
);
$template->assign_vars(array(
'IMAGE_PATH' => $root_path . "images/")
);
$template->pparse('body');
include ($root_path . "hotels/includes/salon-footer.php");
?>
因为我没用过FastTemplate
不知是否遗漏了某些设定呢?
谢谢您的协助!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.109.139.91
1F:→ tonytsai88:你这错误讯息是include时找不到档案.. 03/04 01:32