...

View Full Version : php not working in divs?



wincode
11-14-2010, 05:52 AM
Hello, I'm not sure if I should be posting this here, but I have this round-corner box css that works fine with text and html, but doesn't seem to work with php tags.

This code works:

<div>
<b class="spiffy">
<b class="spiffy1"><b></b></b>
<b class="spiffy2"><b></b></b>
<b class="spiffy3"></b>
<b class="spiffy4"></b>
<b class="spiffy5"></b></b>

<div class="spiffyfg">
Text, text, text...
</div>

<b class="spiffy">
<b class="spiffy5"></b>
<b class="spiffy4"></b>
<b class="spiffy3"></b>
<b class="spiffy2"><b></b></b>
<b class="spiffy1"><b></b></b></b>
</div>

But not this (the box is broken, and the content of the php include show up under the box):

<div>
<b class="spiffy">
<b class="spiffy1"><b></b></b>
<b class="spiffy2"><b></b></b>
<b class="spiffy3"></b>
<b class="spiffy4"></b>
<b class="spiffy5"></b></b>

<div class="spiffyfg">
<?php include('leftheader.php'); ?>
</div>

<b class="spiffy">
<b class="spiffy5"></b>
<b class="spiffy4"></b>
<b class="spiffy3"></b>
<b class="spiffy2"><b></b></b>
<b class="spiffy1"><b></b></b></b>
</div>


Thank you

Keleth
11-14-2010, 05:56 AM
leftheader.php is in the same directory? It reads fine on its own?

phpdeveloper
11-14-2010, 07:22 AM
Please remove all content in leftheader.php for temporary and something eho "hi"; and check it its display on front end.

Because may be some error in your leftheader.php file.

Phil Jackson
11-14-2010, 07:59 AM
<?php if ( file_exists( 'leftheader.php' ) ) { include('leftheader.php'); }else{ echo 'directory is incorrect'; } ?>

wincode
11-14-2010, 08:41 PM
I only added a text line in leftheader.php, but it still doesn't work. I replaced
<?php include('leftheader.php'); ?> with
<?php echo "hi"; ?> , but that did not work either.

Keleth
11-14-2010, 10:07 PM
If you go to leftheader.php, it shows up ok? And leftheader.php is in the same directory as this file (same questions as above).

EDIT: Noticed your last post (forgot to refresh, had opened the page before i left the house). If its not showing up, its means your PHP isn't working. It is a .php extension, right? PHP server's working ok?

DrDOS
11-14-2010, 10:10 PM
When in doubt check permissions. I don't know how many times I had a problem like that only to find it was permissions.

wincode
11-14-2010, 11:47 PM
Sorry guys, I think you misunderstood, I wasn't clear enough. The problem was that there was a div in the leftheader.php page messing things up. But I fixed it and now it works :)

Thanks a lot for your help :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum