Grow your CSS skills. Land your dream job.

fwrite adding unwanted charecters

  • # February 2, 2013 at 2:34 am

    Hi,
    I have this PHP code:

    < ?php
    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)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".