Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #9612

Re: why php echo does not show up in HTML?

Message-ID <1610733.vASnu692iJ@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Organization PointedEars Software (PES)
Date 2013-05-24 22:32 +0200
Subject Re: why php echo does not show up in HTML?
Newsgroups comp.lang.php
References (1 earlier) <af70263f-b09f-49cd-b3e3-95b4c04fe39f@z10g2000yqd.googlegroups.com> <cffe44b6-a68e-49ab-8c19-d0fd55e7f3d1@d6g2000yqi.googlegroups.com> <timstreater-5D50AB.14400724052013@news.individual.net> <knnr88$4bg$1@dont-email.me> <timstreater-80BD7F.16473024052013@news.individual.net>

Show all headers | View raw


Tim Streater wrote:

> Jerry Stuckle <jstucklex@attglobal.net> wrote:
>> On 5/24/2013 9:40 AM, Tim Streater wrote:
>> > 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)?
> 
> None, I don't suppose, but it was the standard where I used to work. I
> just followed it. I use .php for scripts that *only* contain php.

“.phtml” for *templates* is a quasi-standard *at least* since Zend Framework 
uses it.  IIRC, Eclipse PDT and Zend Studio assign files with “.phtml” 
suffix the PHP Editor plugin as default.  Using “.phtml” for anything other 
than templates is unwise.  The convention probably stems from “.shtml” for 
SSI.
 
> It's a shame that the universe doesn't use proper file metadata but as
> we seem to be stuck using extensions they may as well mean something.

ACK.


PointedEars
-- 
> If you get a bunch of authors […] that state the same "best practices"
> in any programming language, then you can bet who is wrong or right...
Not with javascript. Nonsense propagates like wildfire in this field.
  -- Richard Cornford, comp.lang.javascript, 2011-11-14

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


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