RE: [PHP-GENERAL] naming file

From: Date: Thu, 22 Jun 2000 17:11:17 +0000
Subject: RE: [PHP-GENERAL] naming file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-2662@lists.php.net to get a copy of this message
Two ways I can think of: 1. Convert your SSI files to PHP files and use the require/include() functions. 2. Place the SSI in the HTML using include virtual. Chris -----Original Message----- From: php3@developersdesk.com [mailto:php3@developersdesk.com] Sent: Thursday, June 22, 2000 7:35 AM To: yat; php-general@lists.php.net Subject: Re: [PHP-GENERAL] naming file Addressed to: "yat" <yat@usa.net> php-general@lists.php.net ** Reply to note from "yat" <yat@usa.net> Thu, 22 Jun 2000 15:10:56 +0800 > > another question on this topic, can i put both html into php and SSI > at the same time..? > > That is > > AddType application/x-httpd-php3 .php3 .phtml .html & AddType > text/html .shtml .html AddHandler server-parsed .shtml .html at the > same time.. > > i have tried but fail.. only run php. Is this correct? > No it will not work. You only get one server method for each file extension. I believe you will find that Apache always uses the first mime type it finds in the config files for an extension. I think the best way to handle it is to make .shtml go thru SSI, .php go thru php and .html go thru the normal apache process; then use the extension to control how a particular file is processed. That is how Apache is set up to work. Why fight it? The only unusual thing I ever do is make .html go thru SSI on some sites that use <#--include virtual="some_file.html"--> on every page. As far as hiding php code behind .html, I'm proud to show the world that my programs are PHP! Rasmus and others have assured me that search engines accept .php as well as they accept .html, and I've certainly seen no evidence that shows they are wrong. There is nothing you can do with SSI that cannot be duplicated within php. Since I started using php, I haven't used SSI for anything in new sites. In fact, I haven't used much .html either. Even simple pages have something in them that makes it desirable to keep it all php. One common example... (C) 1998-<?=date( 'Y' )?> Internet Marketing Specialists Now I don't have to update the copyright date on pages, it always shows the current year. (C) 1998-2000 Internet Marketing Specilists This ends up at the bottom of almost every page we create, and could be done in SSI, but then I would have to maintain two different ways of doing the same thing. Rick Widmer Internet Marketing Specialists www.developersdesk.com -- 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 (#2662) next »