simple error

Discussion in 'PHP' started by davenet, Oct 31, 2007.

  1. #1
    I created a new php script. I receive a simple error message that I do not know how to fix it.

    Warning: require_once(Connections/advance_conn.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\advance\article.php on line 1
    
    Fatal error: require_once() [function.require]: Failed opening required 'Connections/advance_conn.php' (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\advance\article.php on line 1
    PHP:
    and this is what I have for advance_conn :

    <?php
    # FileName="Connection_php_mysql.htm"
    # Type="MYSQL"
    # HTTP="true"
    $hostname_advance_conn = "localhost";
    $database_advance_conn = "advance";
    $username_advance_conn = "root";
    $password_advance_conn = "****";
    $advance_conn = mysql_pconnect($hostname_advance_conn, $username_advance_conn, $password_advance_conn) or trigger_error(mysql_error(),E_USER_ERROR); 
    ?>
    PHP:
    any help ?
     
    davenet, Oct 31, 2007 IP
  2. xemiterx

    xemiterx Peon

    Messages:
    62
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Looks to me like a simple path or file name error. PHP can't find the file that you told it was required.

    you have a file named article.php that you are trying to run and in that file you have the line require_once('Connections/advance_conn.php'); correct?

    Are you certain that you have a file named advance_conn.php located in C:\xampp\htdocs\advance\Connections\ ?
     
    xemiterx, Oct 31, 2007 IP
  3. Lordy

    Lordy Peon

    Messages:
    1,643
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #3
    what is your require path? that is of more importance, i think your require line is incorrect.
     
    Lordy, Oct 31, 2007 IP