[請益] zend 初始設定
我依照3897篇的教學
設定了zend framework
可以run
但是我試著把include path的那三行註解掉
並把php.ini的include_path改成下面這樣
; Windows: "\path1;\path2"
include_path = ".;C:\AppServ\www\zf-tutorial\library"
他卻說
Warning: require_once(Zend/Loader.php) [function.require-once]: failed to
open stream: No such file or directory in
C:\AppServ\www\zf-tutorial\public\index.php on line 12
Fatal error: require_once() [function.require]: Failed opening required
'Zend/Loader.php' (include_path='.;C:\php5\pear') in
C:\AppServ\www\zf-tutorial\public\index.php on line 12
請問include_path那邊應該是要怎麼改 才能讓PHP需要include時
自動去那裡抓呢
感謝
下面是原作的index.php
<?php
//Basic Config
error_reporting(E_ALL | E_STRICT); //設定Error Report的等級
date_default_timezone_set('Asia/Taipei'); //設定時區為台北
//Include path
define ('P_S', PATH_SEPARATOR);
set_include_path('.' .P_S .'../library' .P_S .'../application/models/'
.P_S
.get_include_path());
//漏了這兩行 :)
require_once 'Zend/Loader.php';
Zend_Loader::registerAutoload();
//Controller
$frontController = Zend_Controller_Front::getInstance();
$frontController->setControllerDirectory('../application/controllers');
$frontController->dispatch();
?>
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.113.69.86
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):
PHP 近期熱門文章
PTT數位生活區 即時熱門文章