Help with PHP

Discussion in 'Web Design and Development' started by mdzwolf, Jun 9, 2006.

  1. mdzwolf macrumors member

    Oct 13, 2005
    Hey everyone, I am trying to create a php site and the first part is a user login system. I wrote the database functions and put them in a seperate file called MySQL.php and I am trying to use require_once to include the file. However whenever I use the require_once, require, or include command the script doesn't execute it just loads to a blank page and doesn't even show any html or the document title. As soon as I comment out that line it works fine, such as showing the result of phpinfo() and any html in the document. I am totally lost as to why this is. Below is how I have the lined coded:


    Here is how the code is written:



    Any help would be greatly appreciated!
  2. superbovine macrumors 68030


    Nov 7, 2003
    post your code be sure to use the php blocks tag in the post.
  3. thejadedmonkey macrumors 604


    May 28, 2005
    Make sure the MySQL.php file starts and ends with php tags.
    use " instead of ' in the include/require

    see if any of that helps.
  4. RupertJ macrumors newbie

    Dec 30, 2004
    Bristol, UK
    That'll make no difference in this case.

    A blank screen usually means there's a parse error on the page. Look in the PHP error log (or webserver error log, depending on your server and settings) and you'll find the error message there. the code you quoted looked fine, so you'll probably find the error in the included file.

Share This Page