$script_name = getenv("SCRIPT_NAME"); $script_name = str_replace("\","",$script_name);
This code give me an error on line 2. How I can replace backslash on ""?
TH
The backslash has a special meaning within double quotes. Use single quotes.
str_replace('\',"",$script_name);
doesnt strip_slashes() do the same thing?
actually, the backslash can also espcape a single quote if its inside single quotes itself
you need to escape the backslash itself
$script_name = str_replace("\","",$script_name);