Hi Kevin,
>On 8/10/07, Kexiao Liao <[EMAIL PROTECTED]> wrote:
>
> If my zfgrid/document_root corresponds to the physical path on the
> production server is /home/kevin/public_html/zfgrid/document_root, how do we
> include that path through .htaccess?
>
If you want to write that into .htaccess you can put this line below:
php_value include_path "/home/kevin/public_html/zfgrid/document_root"
However, this line will only take effect if master httpd.conf sets
"AllowOverride all" for user directory.
My usual route is below, adding zf into include path in bootstrap file.
> How do we include it into bootstrap file? Using something like:
> set_include_path(
> $appDir . '/models'
> . PATH_SEPARATOR
> . get_include_path()
> . PATH_SEPARATOR
> . '/home/liaok/wwwroot/ZendFramework-1.0.0/library'
> . PATH_SEPARATOR
> . '/home/kevin/public_html/zfgrid/document_root'
> );
>
>
What's your layout model? Do you differ normal frontend with admin
backend controllers, models, and views?
Talking my approach, my favourite layout is like this
ROOT_of_app_in_public_html
-zfapp
-admin
-controllers
-models
-views
-default
-controllers
-models
-views
+includes
+templates
+js
-index.php
ZF is put outside the application's root. this is mainly because i
share ZF among several applications (and consider the best practice).
in my bootstrap file, i define path to ZF lib like this (or you can
also pull it from a config file):
$zfPath = '/path/to/zf'; //in your case, it's
/home/liaok/wwwroot/ZendFramework-1.0.0/library
define('APP_PATH',dirname(__FILE__));
set_include_path('.'
. PATH_SEPARATOR.$zfPath
. PATH_SEPARATOR.APP_PATH.'/zfapp/admin/models'
. PATH_SEPARATOR.APP_PATH.'/zfapp/default/models'
. PATH_SEPARATOR.get_include_path());
which is almost the same with yours with difference it adds 2 model
dirs into include path.
Regards,
Mike