设置的.htaccess为Zend框架

编程入门 行业动态 更新时间:2024-10-20 00:40:15
本文介绍了设置的.htaccess为Zend框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我下面的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框架

本文发布于:2023-11-01 18:10:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1550042.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:框架   htaccess   Zend

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!