我下面的Zend Framework的教程在这里(www.ibm/developerworks/opensource/tutorials/os-php-zend2/section2.html)。我刚刚开始了,但我有问题,设立这个.htaccess文件。根据清单。 1中的链接,有$ C $的C座的文章说我需要创建:
I'm following a tutorial on Zend Framework here (www.ibm/developerworks/opensource/tutorials/os-php-zend2/section2.html). I barely got started, but I'm having problems setting up this .htaccess file. Under Listing. 1 in the link, there is a block of code the article says I need to create:
htaccess RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] php_value include_path ".;c:\ZendFramework\library"
如何创建.htaccess文件正确,这样的index.php文件,这无非是在页面上只有几个版画,将正常开启在我的本地?我的Zend是在E:\ zendframekwork \库。到目前为止,我有以下几点:
How do I create the .htaccess file properly so that an index.php file, which is nothing more than just a few prints on the page, will be opened properly on my localhost? My Zend is at E:\zendframekwork\library. So far, I have the following:
RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] set_include_path('.;E:\zendframekwork\library');
正如你所看到的,我删除了htaccess的部分(我需要吗?),并改写了最后一道防线,但它显然是不正确的,我试图打开index.php文件时,仍然出现错误。我怎样写这是否正确?
As you can see, I removed the "htaccess" part (do I need that?) and rewrote the last line, but it is obviously incorrect as I still get an error when trying to open index.php. How do I write this correctly?
此外,本教程提到具有用于Zend的正确路径HTTPD.CONF指令。我抬头对我的Apache的httpd.conf文件,但并没有什么。参见Zend的。我需要为此做些什么呢?
Also, the tutorial mentions HTTPD.CONF directives having correct paths for Zend.. I looked up my HTTPD.CONF file on Apache, but there is nothing refering to Zend. Do I need to do something about this as well?
TIA !!
推荐答案好你遵循了Zend快速入门
Better you follow the Zend Quickstart
Zend的快速入门
的.htaccess
.htaccess
RewriteEngine on RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php
请检查您的httpd.conf中的一个选项覆盖将它设置为全部
Check your httpd.conf for an option "overwrite" set it to All
更多推荐
设置的.htaccess为Zend框架
发布评论