PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
arborint wrote:Your PHP configuration is probably set to add slashes to request variables. There are functions to strip slashes.
Where would I find such a function?
More importantly, when you are not hostng the php yourself but are relying on the server of the host, how do you access files such as php.ini if need be? I see the file on the server directory, which is a Linux server. Do I need to download that file to my hard drive to edit it, and can I edit that in a Mac environment and then upload it again to the Linux-based server?
dmwesq wrote:More importantly, when you are not hostng the php yourself but are relying on the server of the host, how do you access files such as php.ini if need be? I see the file on the server directory, which is a Linux server. Do I need to download that file to my hard drive to edit it, and can I edit that in a Mac environment and then upload it again to the Linux-based server?
If you can edit the php.ini file and restart the web server, then do that. Otherwise, you can call functions within your scripts to change some settings. And there are functions like I mentioned above to modify values.
The slash is added due to something called "escaping" - the server you're on seems to be a little whacked, since this hasn't been an issue in quite some time. (since PHP 4.3 I think?)
The setting that's causing this is magic_quotes_gpc and PHP6 will be removing it altogether.
I'd strongly recommend you just shut it off. In your .htaccess file, add the line: