Re: Dynamic PHP Home Page

From: Date: Mon, 10 Jul 2000 02:43:08 +0000
Subject: Re: Dynamic PHP Home Page
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-5670@lists.php.net to get a copy of this message
Normally I'd just say to reconfigure your http server so that php parses your .html,.htm extensions as well. I realise though that sometimes a situation arises in which you do not have control of the http server or wish to pull data from a script on a php enabled server for inclusion in a page which is on a server without php. Both of these suck, but do happen on occasion. First of all, don't forget the javascript "document.lastModified" property for this example. ex: <script> document.write((Date.parse(document.lastModified)!=0)?document.lastModified: 'not avail.'); </script><noscript>not avail</noscript> If other situations arise (this is an example, but all use javascript), use the src parameter of the <script> tag, and get your php script to dump out legal javascript. ex. test.php <? $extdisplay="this is from an external page"; ?> document.writeln('<? echo AddSlashes($extdisplay) ?>'); ex. testlink.html <html><head><title>Untitled</title></head> <body> <script language="JavaScript" src="test.php" type="text/javascript"></script> <noscript>not available</noscript> </body></html> ----- Original Message ----- From: "Ray Street" <charay@ihug.co.nz> To: <php-general@lists.php.net> Sent: Monday, July 10, 2000 11:06 AM Subject: [PHP] Dynamic PHP Home Page > I need to have part of a site's home page dynamic (the "Last Changed" date). > > The way I see it can be done is to have the index.html page call an > index.php3 file using the meta refresh tag. So basically the index.html page > is empty and all it does it start the php3 script. > > Is this the best way to do it? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#5670) next »