PDA

View Full Version : PHP Include



B0C
05-11-2007, 08:58 PM
Hey, I need help including a php file my website page to display a text counter number which has been created in php.

I enter in the following code for the include;



<?php include"http://novaone.co.uk/tools/counter/index.php"; ?>


I am entering this php code into a div tag;


<div id="footer"> <?php include"http://novaone.co.uk/tools/counter/index.php"; ?> </div>


Do you think entering it into the dic tag would make it fail?

redtom
05-11-2007, 09:58 PM
No.

Longer

Dentafrice,
05-11-2007, 10:00 PM
Is the file on the same server as this script?

Beau
06-11-2007, 05:28 AM
Direct includes are never a good idea...

Say the file you're trying to include the counter file in is at http://novaone.co.uk, try this:



<?php include('./tools/counter/index.php'); ?>

B0C
06-11-2007, 12:29 PM
Issue resolved :)

Want to hide these adverts? Register an account for free!