开发者

PHP: calling domain.com/filename/id1234

how do i setup my php file so it can be called from domain.com/filename.php?id=12345 to domain.com/filename/123开发者_高级运维45 ?

THANKS!


You need to use Apache's mod_rewrite

Create a file in your document root called .htaccess and place the following lines.

RewriteEngine on
RewriteRule ^filename/([0-9]+)/?$ filename.php?id=$1
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜