+ Reply to Thread
Results 1 to 5 of 5

Thread: Help With php include

  1. #1
    evil-bunny is offline x10Hosting Member evil-bunny is an unknown quantity at this point
    Join Date
    Apr 2009
    Posts
    2

    Question Help With php include

    hi im new in this of web disign please help me. :eek4:
    I have the following problem i have includes in my web but they don´t work this is the error message: :eek4:
    Warning: include(../presentacion.html) [function.include]: failed to open stream: No such file or directory in /home/aferral/public_html/web/1.php on line 24

    Warning: include() [function.include]: Failed opening '../presentacion.html' for inclusion (include_path='.:/x10hosting/php1/pear') in /home/aferral/public_html/web/1.php on line 24
    :dunno::dunno::dunno:

    i don´t know what it means but dreamweaver say i need change the URL prefix but i dont know where i can find it (i think my URL prefix is www.evilbunny.co.cc/)

    There is the examples
    1
    PLEASE HELP :dunno::dunno:

  2. #2
    nexhunter's Avatar
    nexhunter is offline x10 Sophmore nexhunter is an unknown quantity at this point
    Join Date
    Nov 2007
    Location
    millbury,massachusetts
    Posts
    239

    Re: Help With php include

    those error messages are saying that the file that the php code is trying to reach doesn't exist.
    Use this code if you want to hide the error messages basically just adding the @ in front of the include, the @ kills the debug messages that appear from the code when getting errors.
    Code:
    <?php @include('presentacion.html'); ?>
    and the url prefix is what comes before the actual address so like http:// or https://
    Last edited by nexhunter; 04-23-2009 at 07:46 PM.



  3. #3
    quantum1's Avatar
    quantum1 is offline x10Hosting Member quantum1 is an unknown quantity at this point
    Join Date
    Sep 2008
    Location
    near Nashville, TN
    Posts
    68

    Re: Help With php include

    nexhunter, thanks for the '@' tip. I did not realize that it would suppress debug messages. I can use this a lot when testing stuff for certain functionality without worrying about other stuff.
    Two rules of development:
    1) Computers work for people; People do not work for computers
    2) Maintainability is all that matters.

  4. #4
    xPlozion's Avatar
    xPlozion is offline x10 Elder xPlozion is an unknown quantity at this point
    Join Date
    Mar 2008
    Location
    Delaware, USA
    Posts
    872

    Re: Help With php include

    generally its not a good habit to get into though... sure, there are some exceptions to this rule that are fine to use this in, but if you want to hide error messages, look into error_reporting().

    the error the op is getting is due to the file not existing.

    double check that the file exists in the website root (public_html), since that's where you're saying it's at in your include line

  5. #5
    oscetips is offline x10Hosting Member oscetips is an unknown quantity at this point
    Join Date
    May 2008
    Location
    london
    Posts
    26

    Re: Help With php include

    errors appear for a reason. includes are path sensitive, so make sure the relative path is correct.
    also check the file permissions of presentacion.html

+ Reply to Thread

Similar Threads

  1. PHP Include, file help!
    By stillDOLL in forum Programming Help
    Replies: 8
    Last Post: 10-07-2008, 04:26 AM
  2. PHP and new accounts
    By idani in forum Free Hosting
    Replies: 1
    Last Post: 09-21-2008, 01:49 PM
  3. include php within javascript
    By thezone1 in forum Programming Help
    Replies: 5
    Last Post: 04-24-2008, 12:50 PM
  4. php include is this possible
    By nahsorhseda in forum Programming Help
    Replies: 5
    Last Post: 12-28-2007, 12:09 PM
  5. Cambios IMPORTANTES en PHP.
    By Fedlerner in forum Noticias y Anuncios
    Replies: 1
    Last Post: 11-06-2007, 11:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers