PHP Includes versus sloppy Dreamweaver code and split elements
| From: | Freedomware | Date: | Thu, 15 Jan 2004 09:09:52 +0000 |
| Subject: | PHP Includes versus sloppy Dreamweaver code and split elements | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-174632@lists.php.net to get a copy of this message | ||
My first question is really trivial, but I noticed that Dreamweaver likes to display my PHP includes code like this...
<?phpinclude ("../../../../includes/state/themes.php"); ?> When I do a search and replace function, it often jumps onto another element's line, like this:
</table> <?phpinclude ("../../../../includes/state/themes.php"); ?> I changed the code to this: <?php include ("../../../../includes/state/themes.php"); ?> and it seems to work just fine. But I just wondered if there's some potential problem or convention that I should be aware of. * * * * * * * * * * I also wondered if it's OK to include just a portion of another element, like a table or layer, in a PHP include, like this: <body> <div id="main"> <table> <tr>
<td>First Row</td></tr> <?php include ("../../../../includes/bottom.php"); ?> </body> (The include would include the remainder of the table and div main's closing tag, </div>) Again, I tried it, and it seems to work just fine. I just wondered if there's something I should be warned about. Thanks!