zvcore 1.2.7重大更新
Time: 2009-07-01 15:53 Category: Default Hits: 0 Comments: 0
兼容 Rewrite模式运行。
如果需要开启rewrite,只需要在程序的根目录下面,对应程序入口的index.php的同级目录下面,放置 .htaccess文件里面。
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php复制代码
如果不要开启rewrite,或者系统不支持rewrite,务必保证index.php目录下面没有rewrite文件。
注意更改:
在开启了rewrite功能之后,资源调用的目录assets的访问地址就是./assets/
<img src="./assets/images/logo.png" />
复制代码
如果没有开启rewrite功能,资源调用的目录assets的访问地址就是../assets/
<img src="../assets/images/logo.png" />
复制代码
所以强烈建议多用css来控制页面效果,不到万不得已,不要使用页面嵌入式图片,通用的css和js都可以在头部进行包含,方便修改和缓存。
下载地址:http://zvcore.googlecode.com