You are here: Re: Problem getting included source code to work. « All PHP « IT news, forums, messages
Re: Problem getting included source code to work.

Posted by dimo414 on 05/29/06 23:57

Yes, when include (and require) are run, the included text is parsed
like HTML, so you need to place it inside another <?php ....... ?> set.

As I understand your request, you want to keep everything separate,
which is easy enough to do:

In the file you want the public to see, first include your php code
(this included file can also have other included files in it too)

then:

<html>
<head>
<title>,,,,,,</title>
<OTHER HEAD FORMATTING>
</head>
<body>
<?php include('header.inc') ?> <-- This is your header html file, all
the content that will always be the same on every page.

TEXT, IMGS, WHATEVER <-- This is your actual content. if you want,
you could include this from a file as well.

<?php include('footer.inc') ?> <-- This is your footer html file, just
like the header, exept all the code that goes below the content.

</body>
</html>

Is that what you were asking?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация