[請益] 請教FastTemplate
這也是一個舊的網頁,使用到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
→
03/04 01:32, , 1F
03/04 01:32, 1F
PHP 近期熱門文章
PTT數位生活區 即時熱門文章