Solved
This is a basic example of what I want to do:
$installURL = "http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']);
$save= $installURL;
$str = str_replace( '/setup', '', $save ); //remove /setup/
$installURL= $save;
I am trying to save the $_SERVER variables to a string, and then remove a certain portion of the new string.
Currently, the above code does not work.
The current output is: http://localhost/amdin/setup
I thought the str_replace would remove that last part. I really want to str_replace remove this instead of using other $_SERVER variables.
Correct the last line:
to