views:

19

answers:

1

What is the Url.Content() of asp.net mvc equivalent in php?

I have a file that use my style.css from both pathes:

  1. 'artciles/123/name'
  2. 'artciles/123'

How can I use links to static content, witout using absolute urls?

A: 

I don't know what Url.Content() do, but it sounds as you are after the $_SERVER array, which contains information about the request, such as the host and URI given. Check out $_SERVER['REQUEST_URI'].

Emil Vikström