Reply to Re: How do I include a SSI in a PHP file?

Your name:

Reply:


Posted by NC on 10/10/64 11:32

Warmbells wrote:
>
> I have a couple of includes on each page on our sitesuch as
>
> <!--#include virtual="siteincludes/bottom_menu.htm"-->
> <!--#config timefmt="%e %B, %Y"-->
> <!--#echo var="LAST_MODIFIED"-->
>
> they work great on all the pages except a couple I have had to use a php
> suffix on
>
> What is the correct way to use the above with a php page?

None; SSI and PHP pages are parsed by different Apache modules. You
can't use SSI within a PHP script. What you can do, however, is to
replace SSI instructions with equivalent PHP code:

// <!--#include virtual="siteincludes/bottom_menu.htm"-->
include 'siteincludes/bottom_menu.htm';

// <!--#config timefmt="%e %B, %Y"-->
// <!--#echo var="LAST_MODIFIED"-->
echo date('F j, Y', filemtime($_SERVER['PHP_SELF']));

Cheers,
NC

[Back to original 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

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