473,383 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Parsing PHP with HTML file extension

It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What You Get -
for my fellow stupids) html editor. But I was told that you HAD to rename
your files to .PHP so they would be parsed correctly. Oh contraire if you
are hosted by Apache and have some access to the .htaccess file mechanism

In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"

I guess (from what I read) that this is only a good idea if your page makes
only small use of PHP but it sure makes life easier for simple calls out to
PHP resources.

Here's a link to the details
http://www.wellho.net/mouth/1355_-ph...tic-Pages.html

Still stupid and lazy
Len Bell
Jun 2 '08 #1
29 2112
lenbell schreef:
It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What You Get -
for my fellow stupids) html editor. But I was told that you HAD to rename
your files to .PHP so they would be parsed correctly. Oh contraire if you
are hosted by Apache and have some access to the .htaccess file mechanism

In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"
Hi old stupid ;-)

>
I guess (from what I read) that this is only a good idea if your page makes
only small use of PHP but it sure makes life easier for simple calls out to
PHP resources.
Yes, that is possible.
But passing full HTML files through PHP gives your server a lot of
unneeded overhead.
Your server must now read the WHOLE html file and check if it contains
php tags: <?php

So, yes, it is possible, but not very nice for your server.

But I fail to see why you give your files the extension html if they
contain php. Isn't that very confusing?
The fact you use a What-you-see-is-what-you-sometimes-get-editor is no
reason.

So why do you want that setup anyway?

Regards,
Erwin Moller
>
Here's a link to the details
http://www.wellho.net/mouth/1355_-ph...tic-Pages.html

Still stupid and lazy
Len Bell

Jun 2 '08 #2
lenbell wrote:
It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What
You Get - for my fellow stupids) html editor. But I was told that
you HAD to rename your files to .PHP so they would be parsed
correctly. Oh contraire if you are hosted by Apache and have some
access to the .htaccess file mechanism
In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"

I guess (from what I read) that this is only a good idea if your page
makes only small use of PHP
On the contrary, it is a tremendous waste of resources. It means that every
html file has to be scanned by the interpreter to see if there is any php in
it. Since there hardly ever will be, you will be slowing down all your pages
for no good reason.

And hey, you managed to write a whole paragraph! Your disability is
obviously improving! Very soon you might actually come up with something
sensible to write!
Jun 2 '08 #3
On Wed, 28 May 2008 08:24:27 -0400, lenbell wrote:
It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What You Get -
for my fellow stupids) html editor. But I was told that you HAD to rename
your files to .PHP so they would be parsed correctly. Oh contraire if you
are hosted by Apache and have some access to the .htaccess file mechanism

In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"

I guess (from what I read) that this is only a good idea if your page makes
only small use of PHP but it sure makes life easier for simple calls out to
PHP resources.

Here's a link to the details
http://www.wellho.net/mouth/1355_-ph...tic-Pages.html

Still stupid and lazy
Len Bell
The reason for recommending against this is that it's not possible on
all hosts, and many properly-configured systems won't allow this. It
/also/ does increase the processing load somewhat by parsing all pages
looking for php open tags, but that's pretty minor in the scheme of
things.

--
Tomorrow is the first day of the rest of your life in a career where, if you
really suck, 100% of your work fails and if you're really good and really
lucky only 99% of it is a complete waste of time. - Hal Bogerd
Jun 2 '08 #4

"Paul Lautman" <pa**********@btinternet.comwrote in message
news:6a*************@mid.individual.net...
lenbell wrote:
>It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What
You Get - for my fellow stupids) html editor. But I was told that
you HAD to rename your files to .PHP so they would be parsed
correctly. Oh contraire if you are hosted by Apache and have some
access to the .htaccess file mechanism
In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"

I guess (from what I read) that this is only a good idea if your page
makes only small use of PHP
On the contrary, it is a tremendous waste of resources. It means that
every html file has to be scanned by the interpreter to see if there is
any php in it. Since there hardly ever will be, you will be slowing down
all your pages for no good reason.

And hey, you managed to write a whole paragraph! Your disability is
obviously improving! Very soon you might actually come up with something
sensible to write!
Eat me
Jun 2 '08 #5

"lenbell" <ls****@charter.netwrote in message
news:X9***********@newsfe05.lga...
It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What You
Get - for my fellow stupids) html editor. But I was told that you HAD to
rename your files to .PHP so they would be parsed correctly. Oh contraire
if you are hosted by Apache and have some access to the .htaccess file
mechanism

In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"

I guess (from what I read) that this is only a good idea if your page
makes only small use of PHP but it sure makes life easier for simple calls
out to PHP resources.

Here's a link to the details
http://www.wellho.net/mouth/1355_-ph...tic-Pages.html

Still stupid and lazy
Len Bell
The waist or resources complaint is valid in some cases but in my site I
will be using maybe 15 straight HTML pages and probably 100 PHP pages. The
15 HTML pages will change often and are quite busy.

Further I think it may be a useful tool during development and then could be
"Deleted" at some point.

Len
Jun 2 '08 #6
lenbell wrote:
It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What You Get -
for my fellow stupids) html editor. But I was told that you HAD to rename
your files to .PHP so they would be parsed correctly. Oh contraire if you
are hosted by Apache and have some access to the .htaccess file mechanism

In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"

I guess (from what I read) that this is only a good idea if your page makes
only small use of PHP but it sure makes life easier for simple calls out to
PHP resources.

Here's a link to the details
http://www.wellho.net/mouth/1355_-ph...tic-Pages.html

Still stupid and lazy
Len Bell

Uh, lenbell, you were not told that you HAD to rename your files to
..PHP. You were told that you HAD to rename your files to .php UNLESS
you did special things on the host. That meant mucking with the
..htaccess file. It is NOT a good idea. It is best to have ALL php
files end with the php extension -- but no one said you HAD to do it.

Go back and read the responses. I, for one, said that.
Jun 2 '08 #7
..oO(Peter H. Coffin)
>The reason for recommending against this is that it's not possible on
all hosts, and many properly-configured systems won't allow this.
IMHO a properly configured system _does_ allow it. Otherwise I won't
host any sites there.

Micha
Jun 2 '08 #8
..oO(Erwin Moller)
>Yes, that is possible.
But passing full HTML files through PHP gives your server a lot of
unneeded overhead.
If PHP is used on most if not all pages on the site and the server has
to parse them all anyway, then there's nothing wrong with such a setup.
Of course there are other and better options.
>Your server must now read the WHOLE html file and check if it contains
php tags: <?php

So, yes, it is possible, but not very nice for your server.

But I fail to see why you give your files the extension html if they
contain php. Isn't that very confusing?
It's the easiest way to achieve nicer URLs. A ".html" in a URL is better
than ".php" for various reasons (although even better would be no file
extension at all in the URLs).

Another option would be MultiViews on Apache servers, which allows to
have filenames like

foo.html.php
bar.html.shtml

which you can still access as "foo.html" and "bar.html" or even just
"foo" and "bar". The server can still find them and handle them properly
according to their file extensions. That way you can easily mix static
and dynamic pages of all kinds without revealing such technical details
to the site visitors.

Micha
Jun 2 '08 #9
lenbell wrote:
"lenbell" <ls****@charter.netwrote in message
news:X9***********@newsfe05.lga...
>It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What You
Get - for my fellow stupids) html editor. But I was told that you HAD to
rename your files to .PHP so they would be parsed correctly. Oh contraire
if you are hosted by Apache and have some access to the .htaccess file
mechanism

In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"

I guess (from what I read) that this is only a good idea if your page
makes only small use of PHP but it sure makes life easier for simple calls
out to PHP resources.

Here's a link to the details
http://www.wellho.net/mouth/1355_-ph...tic-Pages.html

Still stupid and lazy
Len Bell
The waist or resources complaint is valid in some cases but in my site I
Since you have already classified yourself, I will violate net protocol
and tell you that the word is "waste", not "waist".
will be using maybe 15 straight HTML pages and probably 100 PHP pages. The
15 HTML pages will change often and are quite busy.
So?
>
Further I think it may be a useful tool during development and then could be
"Deleted" at some point.
Deliberately doing something the wrong way and then going back and
correcting it usually means you will miss something and it will break.
How is this any more of a "useful tool" than calling html as html and
php as php? What is to be gained by calling php as html? In fact, all
you are doing is adding confusion. I, as a developer, when I see a .php
extension I expect to find php code and when I see a .html or .htm
extension expect to find NO php.

Why do you insist upon calling a banana an apple because in your
specialized dictionary you say to treat all apples as bananas?

>
Len

Jun 2 '08 #10
Michael Fesser wrote:
It's the easiest way to achieve nicer URLs. A ".html" in a URL is better
than ".php" for various reasons (although even better would be no file
extension at all in the URLs).
I'm curious:

How is it 'nicer'?
Why is ".html" better than ".php"?
Why is not extension even better?
Jun 2 '08 #11

<sheldonlgwrote in message >Still stupid and lazy
>Len Bell

Uh, lenbell, you were not told that you HAD to rename your files to .PHP.
You were told that you HAD to rename your files to .php UNLESS you did
special things on the host. That meant mucking with the .htaccess file.
It is NOT a good idea. It is best to have ALL php files end with the php
extension -- but no one said you HAD to do it.

Go back and read the responses. I, for one, said that.
Uh sheldonlg

I'm Still stupid after all these messages <smile>

I know - I just put that out for those newbee's like me that might want to
keep using WYSIWYG editors and those that need only a little PHP in their
page.

Why are you people so uptight?

Len
Jun 2 '08 #12

<sheldonlgwrote in message
news:o7******************************@giganews.com ...
lenbell wrote:
>"lenbell" <ls****@charter.netwrote in message
news:X9***********@newsfe05.lga...
>>It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What You
Get - for my fellow stupids) html editor. But I was told that you HAD
to rename your files to .PHP so they would be parsed correctly. Oh
contraire if you are hosted by Apache and have some access to the
.htaccess file mechanism

In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"

I guess (from what I read) that this is only a good idea if your page
makes only small use of PHP but it sure makes life easier for simple
calls out to PHP resources.

Here's a link to the details
http://www.wellho.net/mouth/1355_-ph...tic-Pages.html

Still stupid and lazy
Len Bell
The waist or resources complaint is valid in some cases but in my site I

Since you have already classified yourself, I will violate net protocol
and tell you that the word is "waste", not "waist".
>will be using maybe 15 straight HTML pages and probably 100 PHP pages.
The 15 HTML pages will change often and are quite busy.

So?
>>
Further I think it may be a useful tool during development and then could
be "Deleted" at some point.

Deliberately doing something the wrong way and then going back and
correcting it usually means you will miss something and it will break. How
is this any more of a "useful tool" than calling html as html and php as
php? What is to be gained by calling php as html? In fact, all you are
doing is adding confusion. I, as a developer, when I see a .php extension
I expect to find php code and when I see a .html or .htm extension expect
to find NO php.

Why do you insist upon calling a banana an apple because in your
specialized dictionary you say to treat all apples as bananas?

>>
Len
Why are you so uptight?
Spell checkers don't check for stupid now do they

Len
Jun 2 '08 #13
lenbell wrote:
<sheldonlgwrote in message >Still stupid and lazy
>>Len Bell
Uh, lenbell, you were not told that you HAD to rename your files to .PHP.
You were told that you HAD to rename your files to .php UNLESS you did
special things on the host. That meant mucking with the .htaccess file.
It is NOT a good idea. It is best to have ALL php files end with the php
extension -- but no one said you HAD to do it.

Go back and read the responses. I, for one, said that.

Uh sheldonlg

I'm Still stupid after all these messages <smile>

I know - I just put that out for those newbee's like me that might want to
keep using WYSIWYG editors and those that need only a little PHP in their
page.

Why are you people so uptight?

Len
It is not being "uptight". You might call it a reaction to
"unwarranted, bad-choice stubbornness". Tell you what, go ahead and do
it your way. Remember WYDISWYG. (D=do).
Jun 2 '08 #14

<sheldonlgwrote in message
news:o7******************************@giganews.com ...
lenbell wrote:
><sheldonlgwrote in message >Still stupid and lazy
>>>Len Bell
Uh, lenbell, you were not told that you HAD to rename your files to
.PHP. You were told that you HAD to rename your files to .php UNLESS you
did special things on the host. That meant mucking with the .htaccess
file. It is NOT a good idea. It is best to have ALL php files end with
the php extension -- but no one said you HAD to do it.

Go back and read the responses. I, for one, said that.

Uh sheldonlg

I'm Still stupid after all these messages <smile>

I know - I just put that out for those newbee's like me that might want
to keep using WYSIWYG editors and those that need only a little PHP in
their page.

Why are you people so uptight?

Len

It is not being "uptight". You might call it a reaction to "unwarranted,
bad-choice stubbornness". Tell you what, go ahead and do it your way.
Remember WYDISWYG. (D=do).
Do the words judgmental, arrogant and condescending mean anything to you?
Jun 2 '08 #15
lenbell wrote:
<sheldonlgwrote in message
news:o7******************************@giganews.com ...
>lenbell wrote:
>><sheldonlgwrote in message >Still stupid and lazy
Len Bell
Uh, lenbell, you were not told that you HAD to rename your files to
.PHP. You were told that you HAD to rename your files to .php
UNLESS you did special things on the host. That meant mucking
with the .htaccess file. It is NOT a good idea. It is best to
have ALL php files end with the php extension -- but no one said
you HAD to do it.
Go back and read the responses. I, for one, said that.

Uh sheldonlg

I'm Still stupid after all these messages <smile>

I know - I just put that out for those newbee's like me that might
want to keep using WYSIWYG editors and those that need only a
little PHP in their page.

Why are you people so uptight?

Len

It is not being "uptight". You might call it a reaction to
"unwarranted, bad-choice stubbornness". Tell you what, go ahead and
do it your way. Remember WYDISWYG. (D=do).

Do the words judgmental, arrogant and condescending mean anything to
you?
Do the words, stubborn, argumentative prat mean anything to you?
Jun 2 '08 #16
lenbell wrote:
<sheldonlgwrote in message >Still stupid and lazy
>>Len Bell
Uh, lenbell, you were not told that you HAD to rename your files to .PHP.
You were told that you HAD to rename your files to .php UNLESS you did
special things on the host. That meant mucking with the .htaccess file.
It is NOT a good idea. It is best to have ALL php files end with the php
extension -- but no one said you HAD to do it.

Go back and read the responses. I, for one, said that.

Uh sheldonlg

I'm Still stupid after all these messages <smile>

I know - I just put that out for those newbee's like me that might want to
keep using WYSIWYG editors and those that need only a little PHP in their
page.

Why are you people so uptight?
Because you suggested a solution in a public place, which should not be
followed, and might confuse people new to the material, of worse yet,
encourage them follow it... Our responses are not only for you, but also
for the people searching for answers, finding your suggestion, and they
should be discouraged to go this route.

Another reason is of course that every with some years PHP coding
usually has cursed predecessors for the use of this kind of ugly
solutions / hacks. I also think encouraging proper coding standards are
a big reason why seasoned developers with seldomly a question of their
own still frequent this group. The more people are coding properly, the
less chance I'll have to thwack previous coders on future projects :)
--
Rik Wasmus
....spamrun finished
Jun 2 '08 #17
lenbell a écrit :
The waist or resources complaint is valid in some cases but in my site I
will be using maybe 15 straight HTML pages and probably 100 PHP pages. The
15 HTML pages will change often and are quite busy.

Further I think it may be a useful tool during development and then could be
"Deleted" at some point.
Still it's better imo (and off-topic) to use URL rewriting to redirect a
..html to a .php and make exceptions for real .html files. No waste at
all, and the same exact behaviour.

Regards,
--
Guillaume
Jun 2 '08 #18

"Paul Lautman" <pa**********@btinternet.comwrote in message
news:6a*************@mid.individual.net...
lenbell wrote:
><sheldonlgwrote in message
news:o7******************************@giganews.co m...
>>lenbell wrote:
<sheldonlgwrote in message >Still stupid and lazy
>Len Bell
Uh, lenbell, you were not told that you HAD to rename your files to
.PHP. You were told that you HAD to rename your files to .php
UNLESS you did special things on the host. That meant mucking
with the .htaccess file. It is NOT a good idea. It is best to
have ALL php files end with the php extension -- but no one said
you HAD to do it.
Go back and read the responses. I, for one, said that.

Uh sheldonlg

I'm Still stupid after all these messages <smile>

I know - I just put that out for those newbee's like me that might
want to keep using WYSIWYG editors and those that need only a
little PHP in their page.

Why are you people so uptight?

Len

It is not being "uptight". You might call it a reaction to
"unwarranted, bad-choice stubbornness". Tell you what, go ahead and
do it your way. Remember WYDISWYG. (D=do).

Do the words judgmental, arrogant and condescending mean anything to
you?

Do the words, stubborn, argumentative prat mean anything to you?
Yes they do and now I'm severely hurt :(
eat me
Now I feel better :)
Jun 2 '08 #19

"Guillaume" <gg*****@NOSPAM.gmail.com.INVALIDwrote in message
news:g1**********@biggoron.nerim.net...
lenbell a écrit :
>The waist or resources complaint is valid in some cases but in my site I
will be using maybe 15 straight HTML pages and probably 100 PHP pages.
The 15 HTML pages will change often and are quite busy.

Further I think it may be a useful tool during development and then could
be "Deleted" at some point.

Still it's better imo (and off-topic) to use URL rewriting to redirect a
.html to a .php and make exceptions for real .html files. No waste at all,
and the same exact behaviour.

Regards,
--
Guillaume
I'm admittedly stupid <smile>

But I don't understand what you just said

I wonder if there is a newsgroup for PHP dummies?

Len
Jun 2 '08 #20
Peter H. Coffin wrote:
or transcribed by elves on the fly from a big book
chained to a table.
But Elves can catch terrible bugs!


Jun 2 '08 #21
On Wed, 28 May 2008 17:03:56 +0100, Paul Lautman wrote:
Peter H. Coffin wrote:
>or transcribed by elves on the fly from a big book
chained to a table.

But Elves can catch terrible bugs!
Not if you give them a bath at least once a week.

--
Yes, Java is so bulletproofed that to a C programmer it feels like being in a
straightjacket, but it's a really comfy and warm straightjacket, and the world
would be a safer place if everyone was straightjacketed most of the time.
-- Mark 'Kamikaze' Hughes
Jun 2 '08 #22
Peter H. Coffin wrote:
On Wed, 28 May 2008 08:24:27 -0400, lenbell wrote:
>It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What You Get -
for my fellow stupids) html editor. But I was told that you HAD to rename
your files to .PHP so they would be parsed correctly. Oh contraire if you
are hosted by Apache and have some access to the .htaccess file mechanism

In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"

I guess (from what I read) that this is only a good idea if your page makes
only small use of PHP but it sure makes life easier for simple calls out to
PHP resources.

Here's a link to the details
http://www.wellho.net/mouth/1355_-ph...tic-Pages.html

Still stupid and lazy
Len Bell

The reason for recommending against this is that it's not possible on
all hosts, and many properly-configured systems won't allow this. It
/also/ does increase the processing load somewhat by parsing all pages
looking for php open tags, but that's pretty minor in the scheme of
things.
Actually, there is a significant amount of overhead. Not only does the
interpreter have to parse the pages for php tags, but it has to set up
the entire environment ($_SERVER, $GET, etc.) for every page. That's a
bit of work, also.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jun 2 '08 #23
..oO(Peter H. Coffin)
>On Wed, 28 May 2008 17:47:52 +0200, Michael Fesser wrote:
>.oO(Peter H. Coffin)
>>>In which case, the *right* way, I'd think, would be manage "pages" as
subdirectories, with proper index.* files handling producing the
content. http://www.example.com/this_collection/this_page/ is entirely
apathetic about whether the underlying bits are html, php, python, perl,
COBOL, or transcribed by elves on the fly from a big book chained to a
table.

You want to create a subdirectory and an index file for every single
page?

Sure. http://www.example.com/this_collection/this_page/ isn't any harder
to manage than http://www.example.com/this_collection/this_page.php
For me it would be, if I would have to maintain two things instead of
one for every single page. It also makes it more inconvenient to handle
in any IDE if you have to open another directory to get to the actual
file content. YMMV.
>It's less typing even.
An <http://www.example.com/this_collection/this_pageis the shortest
variant here, which is what I use on my sites. Easy and simple.

Micha
Jun 2 '08 #24
lenbell a écrit :
>Still it's better imo (and off-topic) to use URL rewriting to redirect a
.html to a .php and make exceptions for real .html files. No waste at all,
and the same exact behaviour.

I'm admittedly stupid <smile>

But I don't understand what you just said

I wonder if there is a newsgroup for PHP dummies?
As said, it's off-topic. URL Rewriting is an Apache process, not PHP. I
therefore invite you to search about it on Google or check an Apache
newsgroup.

Regards,
--
Guillaume
Jun 2 '08 #25
Peter H. Coffin wrote:
On Wed, 28 May 2008 17:03:56 +0100, Paul Lautman wrote:
>Peter H. Coffin wrote:
>>or transcribed by elves on the fly from a big book
chained to a table.

But Elves can catch terrible bugs!

Not if you give them a bath at least once a week.
My ones have a bath once a year, whether they need it or not!
Jun 2 '08 #26
Peter H. Coffin:
In which case, the *right* way, I'd think, would be manage "pages" as
subdirectories, with proper index.* files handling producing the
content.
I don't agree, if only because files named "index" are, by and large,
not indexes. But that would be *your* problem, in *your* filename,
hidden from the world, in *their* URL.

--
Jock
Jun 2 '08 #27
sheldonlg:
Michael Fesser wrote:
(although even better would be no file extension at all in the URLs).

Why is not extension even better?
Because they break the rules that URLs should be short, they should be
easy to remember, and they should last. Without them, URLs are
shorter, more easily remembered, and longer lasting (since more can
change while the URL stays meaningful).

--
Jock
Jun 2 '08 #28
On Wed, 28 May 2008 10:12:32 -0400, "lenbell" <ls****@charter.net>
wrote in <hL***********@newsfe05.lga>:
>
"Paul Lautman" <pa**********@btinternet.comwrote in message
news:6a*************@mid.individual.net...
>lenbell wrote:
>><sheldonlgwrote in message
news:o7******************************@giganews.c om...
lenbell wrote:
<sheldonlgwrote in message >Still stupid and lazy
>>Len Bell
>Uh, lenbell, you were not told that you HAD to rename your files to
>.PHP. You were told that you HAD to rename your files to .php
>UNLESS you did special things on the host. That meant mucking
>with the .htaccess file. It is NOT a good idea. It is best to
>have ALL php files end with the php extension -- but no one said
>you HAD to do it.
>Go back and read the responses. I, for one, said that.
>
Uh sheldonlg
>
I'm Still stupid after all these messages <smile>
>
I know - I just put that out for those newbee's like me that might
want to keep using WYSIWYG editors and those that need only a
little PHP in their page.
>
Why are you people so uptight?
>
Len

It is not being "uptight". You might call it a reaction to
"unwarranted, bad-choice stubbornness". Tell you what, go ahead and
do it your way. Remember WYDISWYG. (D=do).

Do the words judgmental, arrogant and condescending mean anything to
you?

Do the words, stubborn, argumentative prat mean anything to you?

Yes they do and now I'm severely hurt :(
eat me
Now I feel better :)
When you say that you're stupid, you're joking. The sad part is that
you're acting fairly stupidly. You've posted a solution to your
problem in a group of people that know far more than you. Then, when
you're told that your solution has some serious problems and those
problems are explained to you, you argue with the very people that you
acknowledge as being more informed, calling them "uptight",
"judgmental", "arrogant" and "condescending".

Actually, I think the person behaving arrogantly here is you. Peter
Coffin, Michael Fesser, Rik Wasmus and the others posting here know
what they're doing. You don't, and yet you argue with and insult
them. That's arrogant.
--
Charles Calvert | Software Design/Development
Celtic Wolf, Inc. | Project Management
http://www.celticwolf.com/ | Technical Writing
(703) 580-0210 | Research
Jun 27 '08 #29
Greetings, Erwin Moller.
In reply to Your message dated Wednesday, May 28, 2008, 16:34:06,
lenbell schreef:
>It's old stupid and lazy here again

I have been wanting to keep using my WYSIWYG (What You See Is What You Get -
for my fellow stupids) html editor. But I was told that you HAD to rename
your files to .PHP so they would be parsed correctly. Oh contraire if you
are hosted by Apache and have some access to the .htaccess file mechanism

In my case through the "cPanel" and

then "Apache Handlers"

Extension(s) Handler
just enter
HTML application/x-httpd-php

Then click "Add"
Hi old stupid ;-)
>>
I guess (from what I read) that this is only a good idea if your page makes
only small use of PHP but it sure makes life easier for simple calls out to
PHP resources.
Yes, that is possible.
But passing full HTML files through PHP gives your server a lot of
unneeded overhead.
Your server must now read the WHOLE html file and check if it contains
php tags: <?php
So, yes, it is possible, but not very nice for your server.
But I fail to see why you give your files the extension html if they
contain php. Isn't that very confusing?
The fact you use a What-you-see-is-what-you-sometimes-get-editor is no
reason.
So why do you want that setup anyway?
>Here's a link to the details
http://www.wellho.net/mouth/1355_-ph...tic-Pages.html
Well, enough were said already, i'll add one bit that typically not used and
not known by many.

I on my server use Apache filter module rather than Apache handler for PHP, it
giving me best possible flexibility.
One of the sites served on my server very old, it was started from a few
informative .html pages. Now it has some automatization, but for visitor it's
still looks the same, and all data available at the same addresses.
Noone know it was redesigned and in huge part - stored in db instead of plain
pages.
I may even tell Apache to parse one random file as PHP (and I did that for a
set of .csv and .xml files before I fully understand the power of URL
rewriting), so not much of a load for server.
It is used only where I want it. And where I don't want it (i.e. in upload
storage folder), I can easily disable PHP at all by removing any filters from
files.
--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>

Jun 27 '08 #30

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Els | last post by:
If I use <? include "file.html"; ?> in the html of my document, do I _have_ to change the extension of that document to .php, or would it still work and be valid if I let it remain .html? --...
4
by: ralphNOSPAM | last post by:
Is there a function or otherwise some way to pull out the target text within an XML tag? For example, in the XML tag below, I want to pull out 'CALIFORNIA'. ...
8
by: guppywon | last post by:
I am trying to map ASP.NET execution to the ".html" extension. And I am encountering a strange error. I'm looking for help configuring my ".html" pages to execute as ".aspx" pages. I have added...
59
by: Lennart Björk | last post by:
Hi All, I have a tiny program: <!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>MyTitle</title> <meta...
4
by: Rick Walsh | last post by:
I have an HTML table in the following format: <table> <tr><td>Header 1</td><td>Header 2</td></tr> <tr><td>1</td><td>2</td></tr> <tr><td>3</td><td>4</td></tr> <tr><td>5</td><td>6</td></tr>...
4
by: Neil.Smith | last post by:
I can't seem to find any references to this, but here goes: In there anyway to parse an html/aspx file within an asp.net application to gather a collection of controls in the file. For instance...
3
by: CptDondo | last post by:
I am working on an embedded system. The entire configuration for the system is stored in an XML file, which is pretty long. It takes about 3 seconds to open the file using domxml_open_file. ...
18
by: Steven Borrelli | last post by:
Hello, I am using the <?php include() ?statement on my website for organizational purposes. However, one of my includes contains some PHP code. Is there any way for the server to actually...
5
by: Benoit | last post by:
I've been instructing myself in XML DOM parsing using the w3schools tutorial and decided to try an example of my own. I'd written a short XML file that looked like this: <?xml version="1.0"...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.