PHP Page Includes

JeffLareaux

New member
Joined
Jun 27, 2004
Messages
1
Location
/home/design
Hi,
I only need to know the code on how to do page includes. Sorry to bother you guys, I am trying to figure this out for a week now and yet I'm still stuck. I would really appreciate this to save time.

I am using DirectAdmin CP and I don't know what I am doing wrong.

<?php

include ('mypage.html');

?>

Thank you very much for your time.
 
I dont see why that doesnt work, but try this:

PHP:
<?
$file = "mypage.html";
if (file_exists($file)) {
@include($file);
} else {
echo "<b>Error</b>: unable to open $file. Please check that it exists and is readable.";
} 
?>
 
Back
Top