dimanche 6 septembre 2015

PHP redirect if statement

I am using this if statement to redirect a user if the values in a .txt document is 0 but if it is 1 I want nothing to happen however I'm having some issues with my code.

This is my code currently:

$setup = require('setup.txt');

if ($setup === "0") {
    echo '<script type="text/javascript"> window.location = "setup.php"    </script>';
}

The setup.txt document currently contains the value 0.

Aucun commentaire:

Enregistrer un commentaire