passing variable between pages

后端 未结 6 1395
青春惊慌失措
青春惊慌失措 2020-12-22 02:29

Is it good way to pass variable between pages using $_GET method with url:

and take

6条回答
  •  囚心锁ツ
    2020-12-22 03:10

    GET variables are a much better way to go. When you start dropping variables into the session, it can have side effects like copy/pasting a URL from browser to browser or trying to bookmark can bring up different pages (which consequently is a nightmare for SEO). Also, it can have complications if you ever start clustering your servers b/c you'll need to deal with session failover.

    IMHO, the best solution is to use mod_rewrite to implement path-based variables...you get pretty URLs with all the benefits of GET vars.

提交回复
热议问题