Path: csiph.com!weretis.net!feeder6.news.weretis.net!panix!.POSTED.panix2.panix.com!not-for-mail From: rcpj@panix.com (Pierre Jelenc) Newsgroups: comp.lang.php,alt.comp.lang.php,alt.php Subject: Re: Newbie needs recommendation for fast learning a little php. Date: Fri, 2 Jul 2021 23:02:53 -0000 (UTC) Organization: Public Access Networks Corp. Message-ID: References: <4mcqdgtiqjshpeg88h50b5l97fp3qmflfu@4ax.com> Injection-Date: Fri, 2 Jul 2021 23:02:53 -0000 (UTC) Injection-Info: reader1.panix.com; posting-host="panix2.panix.com:166.84.1.2"; logging-data="23801"; mail-complaints-to="abuse@panix.com" X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Xref: csiph.com comp.lang.php:18710 alt.comp.lang.php:69 alt.php:3278 In article , wrote: >On Thu, 1 Jul 2021 21:36:05 -0000 (UTC), rcpj@panix.com (Pierre >Jelenc) wrote: > >>In article <4mcqdgtiqjshpeg88h50b5l97fp3qmflfu@4ax.com>, >> wrote: >>> >>>Thanks for clarifying that. I don't control the server, but I've read >>>that those who do can allow html files to be scanned for php code. >>>Maybe my Web host has in fact done that. Would I be able to find some >>>notation about that in the Web host's phpinfo.php file? >> >>You don't need to control the server itself; many hosts --indeed all the >>good ones, I say-- allow you to redirect .html to the PHP engine one way >>or another, typically from .htaccess with AddType and AddHandler >>directives. Check your host's help system or file a support ticket, they >>probably have a FAQ answer ready. > >I have apparently gotten the server to process PHP scripts inside the >HTML file. Things is, that's kind of wasteful and may slow things >down, for me and for others. I did read on one of the many Web pages >I've been looking at over this topic that besides putting "AddType >application/x-httpd-php .html" into my .htaccess file, and making ALL >HTML files get processed for any PHP scripts, that there was also a >way to do it for a single file. I have about five files I need to do >this modification notice for. > >The code for a single file that I saw was " >AddType application/x-httpd-php .html " where yourpage.html >was whatever that one file was named. > >Does anyone know if it's possible to use that declaration, or >something like it, in the .htaccess file so that only the five HTML >files that really need to have PHP processed will get processed and >all other HTML files will not be? It should work (but again, it depends on the way the server is set up). Alternatively, rename the relevant files to .htm and redirect .htm to PHP but leave .html alone. Pierre -- Pierre Jelenc The Gigometer www.gigometer.com The NYC Beer Guide www.nycbeer.org