FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » why php echo does not show up in HTML?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: why php echo does not show up in HTML? [message #181664 is a reply to message #181651] Fri, 24 May 2013 20:32 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
Tim Streater wrote:

> Jerry Stuckle <jstucklex(at)attglobal(dot)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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PHP Contact Form, mt-rand(), problem Validating 1 input
Next Topic: Parsing mbox files with Windows Php
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Feb 17 13:34:55 GMT 2025

Total time taken to generate the page: 0.04730 seconds