Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #9581
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: why php echo does not show up in HTML? |
| Date | 2013-05-24 09:55 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <knnr88$4bg$1@dont-email.me> (permalink) |
| References | <78f2c263-051b-4b12-b2fc-049aeae3fdd6@z8g2000yqd.googlegroups.com> <af70263f-b09f-49cd-b3e3-95b4c04fe39f@z10g2000yqd.googlegroups.com> <cffe44b6-a68e-49ab-8c19-d0fd55e7f3d1@d6g2000yqi.googlegroups.com> <timstreater-5D50AB.14400724052013@news.individual.net> |
On 5/24/2013 9:40 AM, Tim Streater wrote: > In article > <cffe44b6-a68e-49ab-8c19-d0fd55e7f3d1@d6g2000yqi.googlegroups.com>, > steve nospam <steve.nospamm@gmail.com> wrote: > >> > >> > I found the problem. >> > >> > I needed to modify the .htaccess file. added this line >> > >> > AddType application/x-httpd-php .htm >> > >> > Now it works. php works from inside htm file. No need to change file >> > extension. >> >> guys, the above fix did not work on the server. Must be something with >> the php used there. It worked on my local apache server. So, I still >> looking for a solution. My question is this: >> >> If I change my index.htm to index.php, is there a way to make an alias >> or something so that not all my links are broken? so that a link to >> index.htm will use index.php? >> >> Ok, let me go back one step: This is all crazy, because all what I >> wanted to do is simple: use php to include some common html code into >> all my html web pages. So how is one supposed to do this if one can't >> use php inside html? >> >> I want to use php call to include common HTML code into an html page, >> but can't use php from HTML? what is the deal here? So, how do people >> do this thing then? > > You get your: > > AddType application/x-httpd-php .htm > > added to the apache config file on the server. > > However, you should note if if you do that, any .htm file will be sent > to PHP by apache, even if there is no PHP in it. That adds an extra step > to getting your files served up. That is why people have been suggesting > to change the files which use PHP to have a .php extension. > > Personally I add: > > AddType application/x-httpd-php .phtml > > to the apache config file, and use that for files containing any PHP. > That way the PHP interpreter is only involved when a file actually has > PHP in it. > What's the difference between using .phtml and .php (other than the former is non-standard and will not work on all systems)? -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
why php echo does not show up in HTML? steve nospam <steve.nospamm@gmail.com> - 2013-05-24 01:08 -0700
Re: why php echo does not show up in HTML? "Andy" <andy@NOSPAMmanyplay.com> - 2013-05-24 09:50 +0100
Re: why php echo does not show up in HTML? Jerry Stuckle <jstucklex@attglobal.net> - 2013-05-24 09:25 -0400
Re: why php echo does not show up in HTML? steve nospam <steve.nospamm@gmail.com> - 2013-05-24 01:53 -0700
Re: why php echo does not show up in HTML? steve nospam <steve.nospamm@gmail.com> - 2013-05-24 01:57 -0700
Re: why php echo does not show up in HTML? Denis McMahon <denismfmcmahon@gmail.com> - 2013-05-24 22:25 +0000
Re: why php echo does not show up in HTML? steve nospam <steve.nospamm@gmail.com> - 2013-05-24 02:06 -0700
Re: why php echo does not show up in HTML? steve nospam <steve.nospamm@gmail.com> - 2013-05-24 06:20 -0700
Re: why php echo does not show up in HTML? Tim Streater <timstreater@greenbee.net> - 2013-05-24 14:40 +0100
Re: why php echo does not show up in HTML? Jerry Stuckle <jstucklex@attglobal.net> - 2013-05-24 09:55 -0400
Re: why php echo does not show up in HTML? Tim Streater <timstreater@greenbee.net> - 2013-05-24 16:47 +0100
Re: why php echo does not show up in HTML? Jerry Stuckle <jstucklex@attglobal.net> - 2013-05-24 12:07 -0400
Re: why php echo does not show up in HTML? Tim Streater <timstreater@greenbee.net> - 2013-05-24 18:04 +0100
Re: why php echo does not show up in HTML? Jerry Stuckle <jstucklex@attglobal.net> - 2013-05-24 13:30 -0400
Re: why php echo does not show up in HTML? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-05-24 22:32 +0200
Re: why php echo does not show up in HTML? steve nospam <steve.nospamm@gmail.com> - 2013-05-24 07:19 -0700
Re: why php echo does not show up in HTML? Doug Miller <doug_at_milmac_dot_com@example.com> - 2013-05-24 15:02 +0000
Re: why php echo does not show up in HTML? Denis McMahon <denismfmcmahon@gmail.com> - 2013-05-24 22:37 +0000
Re: why php echo does not show up in HTML? The Natural Philosopher <tnp@invalid.invalid> - 2013-05-24 15:00 +0100
Re: why php echo does not show up in HTML? steve nospam <steve.nospamm@gmail.com> - 2013-05-24 07:20 -0700
Re: why php echo does not show up in HTML? Jerry Stuckle <jstucklex@attglobal.net> - 2013-05-24 10:35 -0400
Re: why php echo does not show up in HTML? The Natural Philosopher <tnp@invalid.invalid> - 2013-05-24 16:59 +0100
Re: why php echo does not show up in HTML? Jerry Stuckle <jstucklex@attglobal.net> - 2013-05-24 10:34 -0400
Re: why php echo does not show up in HTML? "Peter H. Coffin" <hellsop@ninehells.com> - 2013-05-24 10:51 -0500
Re: why php echo does not show up in HTML? Richard Yates <richard@yatesguitar.com> - 2013-05-26 07:02 -0700
Re: why php echo does not show up in HTML? "J.O. Aho" <user@example.net> - 2013-05-24 20:26 +0200
Re: why php echo does not show up in HTML? Jerry Stuckle <jstucklex@attglobal.net> - 2013-05-24 15:34 -0400
Re: why php echo does not show up in HTML? Jerry Stuckle <jstucklex@attglobal.net> - 2013-05-24 09:35 -0400
Re: why php echo does not show up in HTML? steve nospam <steve.nospamm@gmail.com> - 2013-05-24 07:14 -0700
Re: why php echo does not show up in HTML? Jerry Stuckle <jstucklex@attglobal.net> - 2013-05-24 10:38 -0400
Re: why php echo does not show up in HTML? steve nospam <steve.nospamm@gmail.com> - 2013-05-24 07:53 -0700
Re: why php echo does not show up in HTML? Jerry Stuckle <jstucklex@attglobal.net> - 2013-05-24 11:06 -0400
Re: why php echo does not show up in HTML? Doug Miller <doug_at_milmac_dot_com@example.com> - 2013-05-24 15:18 +0000
Re: why php echo does not show up in HTML? Jerry Stuckle <jstucklex@attglobal.net> - 2013-05-24 12:04 -0400
Re: why php echo does not show up in HTML? gordonb.aykca@burditt.org (Gordon Burditt) - 2013-05-24 22:59 -0500
Re: why php echo does not show up in HTML? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-05-25 09:20 +0200
Re: why php echo does not show up in HTML? Jerry Stuckle <jstucklex@attglobal.net> - 2013-05-25 09:22 -0400
Re: why php echo does not show up in HTML? Denis McMahon <denismfmcmahon@gmail.com> - 2013-05-24 22:49 +0000
Re: why php echo does not show up in HTML? Scott Johnson <noonehome@chalupasworld.com> - 2013-05-24 17:06 -0700
Re: why php echo does not show up in HTML? Doug Miller <doug_at_milmac_dot_com@example.com> - 2013-05-24 15:12 +0000
Re: why php echo does not show up in HTML? Richard Yates <richard@yatesguitar.com> - 2013-05-26 07:13 -0700
Re: why php echo does not show up in HTML? yousafali3949@gmail.com - 2017-07-16 07:14 -0700
Re: why php echo does not show up in HTML? Mark Lloyd <not@mail.invalid> - 2017-07-16 09:55 -0500
Re: why php echo does not show up in HTML? V <vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvva@hotmail.com> - 2023-07-11 22:22 -0700
csiph-web