Re: newbie question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



.php documents can still be written with all HTML, PHP, or a mixture of
both. If you were to make a .php web page you would not be able to preview
it in your local browser without setting up a local server, where as you
can open a .html document directly in your browser without a local server.
Install XAMPP or MAMP, the local server will interpret the PHP and display
it as HTML in your browser.

On Wed, Sep 16, 2015 at 5:13 PM, Kevin Kinsey <kdk@xxxxxxxxxx> wrote:

> On Wed, Sep 16, 2015 at 03:15:59PM -0400, Tedd Sperling wrote:
> >
> > > On Sep 16, 2015, at 2:35 PM, Ashley Sheridan <ash@xxxxxxxxxxxxxxxxxxxx>
> wrote:
> > > Almost. Actually, it's the web server which sees that as non-php
> content and just outputs it to the standard output to be sent to your
> browser. most web servers, when not told what type of content is being sent
> (with a header call) will default to HTML.
> >
> > I think (I may be wrong) the process will default to text. For example,
> try placing a html file with nothing but a word in it and give it a .html
> extension. The Browser will simply print the word without any HTML tags.
> >
> > > It's still HTML in your PHP files, hence the need for the specific
> file extension.
> >
> > Unless you use a htacess file to force the Server to process .html as
> .php.
> >
> > Cheers,
> >
> > tedd
>
> Yup!  Or use ".cfm", or ".txt" or ForceType *everything* regardless of
> file extension or the lack
> thereof as PHP in .htaccess or httpd.conf or via an Apache Include
> directive or unless you run
> SuPHP or run PHP as a CGI binary or ... how many ways are there to skin a
> cat?
>
> And who really cares about file extensions?  I mean, besides the Windows
> OS, which apparently
> doesn't give a rat's tuchis about trying to ID file types without them....
>
> "PHP is a popular general-purpose scripting language that is especially
> suited to web development."
>    --- Someone at PHP.net
>
> And there are many, *many* ways to run it.  However, as everyone has
> noted, it's not run in
> the browser/HTTP client.
>
> Kevin Kinsey
> OMBE.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux