The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › Back End › fwrite adding unwanted charecters
Hi, I have this PHP code:
if (isset($_POST)) { $file = fopen(ROOT . ‘pages/’ . $_POST, “wb”); if(!$file === false) { echo fwrite($file, stripslashes($_POST)); fclose($file); $title = strtolower(str_replace(” “, “_”, $_POST)); rename(ROOT . ‘pages/’ . $_POST, ROOT . ‘pages/’ . $title . ‘.php’); } } ?>
And it keep adding newlines and spaces where i don’t what them. Please can you help me!