| 11:31 am on May 23, 2008 (gmt 0)|
It sounds like the page that you've inserted the PHP code into isn't getting parsed. Does it have the .php extension?
| 11:57 am on May 23, 2008 (gmt 0)|
the page has a php extention e.g template.php and from what I understand whatever I change on that page shows up on the index.php page
only the include does not work. about not being parsed what do you do for that? as I said before when i view the pages source code from the browser it shows the include code. is that what you mean by not being parsed?
| 12:28 pm on May 23, 2008 (gmt 0)|
yes, definetely not parsed.
Put a <?php echo "hello mom";?> at the top of the page to confirm and see if it shows when you view it or if the code just sits there.
[edited by: Pico_Train at 12:29 pm (utc) on May 23, 2008]
| 12:47 pm on May 23, 2008 (gmt 0)|
well I tried <?php echo "hello mom";?> and it didn't show up on the page
but I could see it when I viewed the source code. so if it wont parse how do you fix that?
| 12:57 pm on May 23, 2008 (gmt 0)|
What is the file name? it should be something like "filename.php"
Also... your server is set up to use PHP.. correct?
| 1:19 pm on May 23, 2008 (gmt 0)|
the file is <?php include("includes/footer.php"); ?>
and I am calling it from a folder e.g www.mysite.com/includes/footer.php
and I want the contents of footer.php to show up on my page which is in
the thing is that the /dir/index.php page calls the layout of the page from the template.php page which I placed the include file in so that it would show up on the /dir/index.php page if i add the include directly to the /dir/index.php page it works.
| 1:50 pm on May 23, 2008 (gmt 0)|
[its more convoluted than I originally thought...]
<?php include("../includes/footer.php"); ?>
| 2:21 pm on May 23, 2008 (gmt 0)|
Or...Don't know exactly how you have things set up, but couldn't you just put your footer info in the "template.php" file and skip the footer.php include altogether?
| 3:20 pm on May 23, 2008 (gmt 0)|
Your problem is almost certainly due to the fact that the template is called by a class
that calls a bunch of "sections"
so figure out if there is a class and what the class calls for.
you might find something like:
$content_page_name .= '';
and each includes (you will need to create yours)
might look like this:
$db = new MySQL_Db;
$db->connect($host, $un, $pw);
$result = $db->query("
| 9:48 pm on May 23, 2008 (gmt 0)|
I think henry is right, I just got an email from the guy that wrote the script & he said that I have to place the include in the index.php file & not the template.php cause the index file calls each part of the directory script e.g categories ect..
only thing is that the include shows up on the page when put in the index file but not in the position that i want it. he didn't mention how to position it.
anyway thanks guys!