Jump to content

Recommended Posts

Okay were making an admin portal for our customers we do webdesign for but still host and for some reason it will not get rid of the \'s. Here's what I am using:

 

	$content = $_POST['content'];
$fh = fopen("$path", 'w') or $message = " <br /><font color=\"red\">Can't open file.</font><br />";
stripslashes ($content);
fwrite($fh, $content);
fclose($fh);
header("location: index.php");

 

It makes them redirect when it is done, shows an error if not, so ... why does it keep adding \'s? it can display it without them but it's randomly tossing it in there.

Link to comment
https://forums.phpfreaks.com/topic/205228-removing-slashes/
Share on other sites

A demo site of the code:

 

http://tyler.geeksnetwork.org/demo/index.php

 

goto the admincp and then you can edit the home.txt BUT when you do a link, <a href="" it makes it <a href\"\" even though I have strip slashes remove them... it only happens during post not load so if its in txt file already it works but if it isn't then you save with them it adds slashed and idk why.

Link to comment
https://forums.phpfreaks.com/topic/205228-removing-slashes/#findComment-1074229
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.