Re: Newbie needs recommendation for fast learning a little php.
[email protected] Fri, 02 Jul 2021 18:49:49 -0400
| Newsgroups | comp.lang.php,alt.comp.lang.php,alt.php |
|---|---|
| Organization | Newshosting.com - Highest quality at a great price! www.newshosting.com |
| Message-ID | <[email protected]> |
On Thu, 1 Jul 2021 21:36:05 -0000 (UTC), [email protected] (Pierre Jelenc) wrote: >In article <[email protected]>, > <[email protected]> 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 "<Files yourpage.html> AddType application/x-httpd-php .html </Files>" 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?