Re: newbie question

From: Date: Wed, 16 Sep 2015 21:13:45 +0000
Subject: Re: newbie question
References: 1 2 3 4 5 6 7 8  Groups: php.general 
Request: Send a blank email to php-general+get-325119@lists.php.net to get a copy of this message
On Wed, Sep 16, 2015 at 03:15:59PM -0400, Tedd Sperling wrote: > > > On Sep 16, 2015, at 2:35 PM, Ashley Sheridan <ash@ashleysheridan.co.uk> 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

« previous php.general (#325119) next »