PHP and Tables
Posted 03 August 2006 - 05:16 PM
I have a page that is contained within a large table.
I have been wanting to swtich to php for the convenience of not having to edit lots of pages.
Alas it has not proven sucessful - I only want to use very simple php to call in to my main page php pages/docs.
For some reason I am having trouble doing this as when I design the main page with the tag:
<div class="body"><?php @ require_once ("$page.php"); ?></div>
It only loads half the page - the tutorials I have read haven't made good sense.
Is there a step by step guide around here that includes a "rule of thumb" and "best practice" guide?
alternatively if someone fancies helping me out it would save me much time - it is only very simple my aim
I have 6 main page links and within each page are many other links -
the main (parent) pages need to be able to list the child links and the child links have to have the ability to 'call' the php info pages into and below those child links.
I hope that is clear :-\
Anyways thanks in advance
Posted 03 August 2006 - 05:43 PM
<?php include("page.php"); ?>
Posted 03 August 2006 - 05:44 PM
Posted 03 August 2006 - 05:50 PM
if an include fails to include, the script continues
if a require fails to include, the script stops
Posted 03 August 2006 - 05:51 PM
I'm slow at typing
Posted 03 August 2006 - 06:12 PM
Your require call is a little off however. Try:
<div class="body"><?php @require_once ("page.php"); ?></div>
If you're including a dynamic page, you can do this:
<div class="body"><?php @require_once ($page . ".php"); ?></div>
Info: PHP Manual
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users