I am writing a code in PHP which is not fully completed. When I open this register.php script in my browser there is only a blank page, because I can't get over require('config.php'). When I delete require('config.php') everything will appear in my browser.
Could you please help me and tell what is wrong with my require?
<?php require('config.php'); if (isset($_POST['submit'])) { } else { $form = <<<EOT <form action="register.php" method="POST"> First Name: <input type="text" name="name" /> <Br/> Last Name: <input type="text" name="lname" /> <Br/> Username: <input type="text" name="uname" /> <Br/> Email: <input type="text" name="email1" /> <Br/> Email2: <input type="text" name="email2" /> <Br/> Pass: <input type="password" name="pass1" /> <Br/> Pass2: <input type="password" name="pass2" /> <Br/> <input type="submit" value="register" name="submit" /> </form> EOT; echo $form; }
<?php ini_set("display_errors", 1); error_reporting(E_ALL); ?>config.phpalso ..__DIR__ . '/config.php'or change the current working dir usingchdir. Also enable error reporting because it will tell what in specific is wrong.