Help With php include

evil-bunny

New Member
Messages
2
Reaction score
0
Points
0
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:
 

nexhunter

New Member
Messages
239
Reaction score
1
Points
0
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:

quantum1

New Member
Messages
68
Reaction score
0
Points
0
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.
 

xPlozion

New Member
Messages
868
Reaction score
1
Points
0
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
 

oscetips

New Member
Messages
26
Reaction score
0
Points
0
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
 
Top