two include on one page.

this is the error i get when i include it

Warning: include(/ano/widget-comments.php) [function.include]: failed to open stream: No such file or directory in D:\hosting\5984986\html\testscript\aa.ph… on line 41

Warning: include() [function.include]: Failed opening ‘/ano/widget-comments.php’ for inclusion (include_path=’.;C:\php5\pear’) in D:\hosting\5984986\html\testscript\aa.ph… on line 41

this is the html page that im using
http://pastie.org/1382154

and here is the php code

http://pastie.org/1382159

pls let me knw whats wrong

Your code

<?php include('/ano/widget-comments.php'); ?>

Needs double quotes "

So this should work

<?php include("/ano/widget-comments.php"); ?>

The type of quotes have nothing to do with your issue as you can use any type of quotes. You need to get rid of your first / in the function parameters.

<?php include('/ano/widget-comments.php'); ?>

Should be fixed to:

<?php include('ano/widget-comments.php'); ?>

The server automatically adds the first / so when this function activates, it’s giving you // instead of the / that you need. Try it out and see if it works!!!

no it still doesnt work yet… juxt the first one loads correctly and the secnd one displays nothin…

Let us see your HTML source code for the page that is compiled. Are you sure you are pointing to the right file in the right directory?

im sure the location is correct.

this is the html page that im using
http://pastie.org/1382154

and here is the php code

http://pastie.org/1382159

Okay, my fault for not being for specific. Show us the HTML code that your browser displays out (i.e. after you call the page and it is displayed in your browser, right-click and choose ‘view page source’).

Sponsor our Newsletter | Privacy Policy | Terms of Service