如何在这个php程序中进行页面链接? [关闭]

For instance, in tumblr.com, the page link will be like tumblr.com/dashboard/x, and x means page number.

In php, i used to set page like /?page=x.

I am wondering that how to make it working like tumblr.com?

I do believe it's not a path that php created.

This is called URL rewriting and can be achieved with Apache's mod_rewrite for example : http://httpd.apache.org/docs/current/mod/mod_rewrite.html

here you apache rewrite mode will take care of this you have to add the rewrite rules in the .htaccess file

# enable apache morRewrite module #
RewriteEngine on
RewriteRule index([0-9]*).ht(m?ml?)$ ?page=$1 [QSA,L]

And you url will look like www.example.com/index12.html The 12 after index in the above url will treat as ?page=12

Hope it makes sense