找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 128|回复: 0
打印 上一主题 下一主题

php下实现伪 url 的超简单方法[转]

[复制链接]

2536

主题

2536

帖子

7532

积分

论坛元老

Rank: 8Rank: 8

积分
7532
跳转到指定楼层
楼主
发表于 2018-2-14 09:24:37 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

            就像我的日志中的地址路径一样,让 index.php?action=one&do=two  
变成: ?index/action/one/do/two
[U]复制代码[/U] 代码如下:
index.php
--------------

we can access the modul in URL like this:
=================================
www.example.com/?forum/topic/20
- it mean load the modul forum.php, and set the _QUERY['topic']=20
www.foo.com/?voting/id/54/type/piechart&choice=2
- it mean load the modul voting.php, and set the _QUERY['id']=54 and _QUERY['type']='piechart' and set _GET['choice']=2
            
            
        
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

用户反馈
客户端