Welcome Guest, Not a member yet? Register   Sign In
argument with dot
#1

[eluser]Louis![/eluser]
Hello everybody,

I have a little issue with an argument which contains a dot, for example :

http://www.example.com/galerie/delete/Desert.jpg

When i display the argument of the function delete i can see that the dot is transformed to an underscore, the value is : Desert_jpg

I don't think if it's a normal result, so if you can help me.

Thanks

Louis
#2

[eluser]richthegeek[/eluser]
so do a preg replace to change it back:
Code:
$file = preg_replace( "/(_)(jpg|png|gif)/", ".$2", $file );
#4

[eluser]Colin Williams[/eluser]
Use uri_protocol of REQUEST_URI and not PATH_INFO.
#5

[eluser]Louis![/eluser]
Thanks a lot, it's fine.




Theme © iAndrew 2016 - Forum software by © MyBB