php - Relative path with last restful parameter -


It seems that this should be a simple fix.

I have a sluggish PHP backend and setup where I have the URL:

site.com/profile/100/photos/

And

Site.com/me/photos

The photo controller will be the same for both and some parts of the front are shared for both Are there.

My question is:

If I am at this URL: site.com/profile/100

and I href:

    

This is taking me to site.com/profile/100/photos instead of site.com/profile/photos . How do I add the URL after 100?

What do you want:

  $ url = "http: / $ _ Server [HTTP_HOST] $ _SERVER [REQUEST_URI] / photo ";    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -