Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End fwrite adding unwanted charecters

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #42415
    Htmlmainiac
    Member

    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!

Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.