马永占,myz,mayongzhan

相当稳定的进步,欢迎回贴交流

马永占ID:mayongzhan
61274次访问,排名1588(-1)好友1人,关注者12
php,apache,mysql,linux,html,css,javascript
mayongzhan的文章
原创 149 篇
翻译 0 篇
转载 0 篇
评论 86 篇
myz的公告

XML聚合
feedsky
最近评论
Henry_Ma:这个笔记不错,我也这样记一下。
ZXS:收藏!
rm:请问如何分析当前打开的URL
比如一个网页的URL是不固定的

需要在每一个url打开的当前页里分析这个URL 其中有个参数是需要调用的 应该如何做呢?
mayongzhan:很深刻
mayongzhan:为什么黑大能知道这些而我不知道.同样是翻资料...哎差距啊...
文章分类
收藏
    相册
    存档
    订阅我的博客
    XML聚合  FeedSky

    原创 是否需要使用mod_rewrite - 马永占 译收藏

    新一篇: freebsd学习 | 旧一篇: 子目录寻找文件的简单方法 - DirectoryRecursiveIterator(目录递归迭代) - SPL - 马永占 译

    版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章原始出版、作者信息和本声明。否则将追究法律责任。http://blog.csdn.net/mayongzhan - 马永占,myz,mayongzhan

    原文地址:http://www.phpguru.org/#212

    最近php-general mailinglist 正在讨论关于mod_rewrite。我的观点很简单,不需要,请看下文:
    /rental/property/23425
    你可能认为上面的那个地址是rewrite的结果。你错了。是在.htaccess中使用了如下内容:
    <Files rental>
        ForceType application/x-httpd-php
    </Files>
    文件被apache当作PHP脚本来执行。意思是你可以使用REQUEST_URI这个服务器变量来得到提交的URL,然后显示内容。
     
     
     
     
    Recent discussion on the php-general mailing list regarding mod_rewrite. My opinion is that if your needs are simple - it's not necessary. Consider:
    /rental/property/23425
    You may think that mod_rewrite is necessary here. It's not. Simply place this in a .htaccess file:

    <Files rental>
        ForceType application/x-httpd-php
    </Files>
    Now the file "rental" will be parsed by Apache as a PHP script. This means you can use the REQUEST_URI server variable to get the requested URI and show the appropriate content.
    This is exactly how the "static" directory is done on this site. It's actually not a directory at all, but a PHP file that looks at the URL and determines the correct content to show.
     
     

    发表于 @ 2008年02月25日 10:38:00|评论(loading...)|收藏

    新一篇: freebsd学习 | 旧一篇: 子目录寻找文件的简单方法 - DirectoryRecursiveIterator(目录递归迭代) - SPL - 马永占 译

    评论

    #w 发表于2008-04-03 11:38:20  IP: 221.7.131.*
    瞎扯老外的蛋
    发表评论  


    登录
    Csdn Blog version 3.1a
    Copyright © myz