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

Home » Imported messages » comp.lang.php » Stuck on Exercise 1
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Stuck on Exercise 1 [message #178649 is a reply to message #178642] Sun, 15 July 2012 14:24 Go to previous messageGo to previous message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma:
Senior Member
In article <jtue8q$clc$1(at)news(dot)albasani(dot)net>,
The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote:

> Christoph Becker wrote:
>> The Natural Philosopher wrote:
>>> AFAIK all php programs MUST start with <?php even if they are
>>> immediately reverted to text with ?>
>>
>> No. It's even legal for a PHP file to contain HTML only (without any
>> <?php ...?>).
>>
>> But to be processed as PHP the webserver has to know, that it's a PHP
>> file. This is typically done by saving the file as *.php instead of *.html
>>
> Really? I must try that..
>
> I have to say I never bothered to write a php file that didn't start
> with <?php

You don't even *have* to use a .php suffix, either. You could use .shit
if you wanted to. But you'd have to configure apache or whatever to
recognise that scripts whose names end in .shit have PHP in them, to be
interpreted please.

The only reason that .php typically works is because the default config
for apache contains the necessary configuration commands for having the
..php work as you'd expect. If you remove that, however, it won't
recognise *any* file as having PHP in it, to be interpreted please.

I use .phtml, personally.

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
[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
Previous Topic: Lost $_SESSION in Google Chrome
Next Topic: Business Developer for IT company
Goto Forum:
  

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

Current Time: Fri Nov 29 18:57:42 GMT 2024

Total time taken to generate the page: 0.04736 seconds