Jump to content

strstr() and str_replace() with ?s


mort

Recommended Posts

Hey all

 

Basically am making an interactive CD ROM, and have ripped a load of my sites using WGET in linux to parse them all as html. What is the problem you ask? Well I use an index.php?view=pagename linking system, and i cant have html files with ? in the filename, as the OS wont allow it.

 

Anyways i have written a script to rename all the files with _ instead of ? which is all fine.

 

Now I have made a script to go through the directory and parse the files, and tryign to replace all link names with the new filenames, ie remove all ?´s and replace them with _´s.

 

strstr() and str_replace() work fine until i put a ? into the criteria. I have tried /? and \? which dont work, i am stuck

 

can anyone offer any idea as to what i am doing wrong?  ::)

 

cheers!

Link to comment
https://forums.phpfreaks.com/topic/56281-strstr-and-str_replace-with-s/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.