Im trying to get just the URI of an url, for example I want /location/to/file out of just server.com/location/to/file. I used preg_replace as such: $query_string = preg_replace("/(.*?)\//","/",$query_string);
where $query_string is "sever.com/location/to/file". I realized that it will replace all instances and print "///file". I looked in the PHP docs and it said that I could apply a limit as to how many times it did the replace by adding an int to the end: ...,$query_string,1); but it gives me an error (Too many paramaters). Does it not work or am I doing it wrong?
-Chris