473,408 Members | 2,839 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,408 software developers and data experts.

PHP-Yes, HTML-No --- Why?

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 http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"/>
</head>
<body>

<?php
$host = $_SERVER['HTTP_HOST'];
$server = strtolower($host);

echo 'My variables<bg>';

echo("<br>Host: $host");
echo("<br>Server: $server");

?>
</body>
</html>

I upload it to my webserver as test.html and as test.php. Then I test
them in my webbrowser. The test.html does not work, but the test.php
does. Can someone tell me why?

Very confused
Lennart Björk
Jan 25 '06
59 6935
d wrote:
"Andrew DeFaria" <An****@DeFaria.com <mailto:An****@DeFaria.com>>
wrote in message news:43***********************@news.sonic.net..

It's your assertion therefore you are burdened with the prove.
(correction s/prove/proof/)
Tell me what would satisfy you, and I'll test it. You seem rather
quiet on that, though. You're proving once again that you either do not read or do not
comprehend. I mentioned this already. How are they meaningless? The sample size was good enough, the tests
were performed enough times, the setups were identical apart from the
variablel we were testing (the files served were even the same files
on both sites). Please tell me how you would test it, and I'll do it
that way. Again I explained this already. I'm not gonna repeat it.
So I see you haven't written code for anything approaching
massive sites, if you claim that. Thanks.

Yeah, where exactly do you see that?

All your silly questions like "what's a product - apache isn't even
sold" etc. It really shows you've not been around people who are
actually selling products to people, which you are in charge of
developing.

Needless to say I find your deductive reasoning and usage of "logic"
quite odd. The above is just another example of that.
--
Just for today, I will not sit in my living room all day in my
underwear. Instead, I will move my computer into the bedroom.

Jan 27 '06 #51
d wrote:
If you're selling your company, or indeed a product, to people
who know, People who know and people who care are two entirely different
worlds.

When they pay your bills, they are exactly the same :)

It's irrelevant if they are paying your bills or not. The sets of people
who know and people who care are still distinct. I doubt that a single
person has ever been fired, not paid or told to change the URLs in he
web design because they ended in .php.
then things like this speak very highly of the attention you pay
to your work. Yeah it's says your a pinhead, hellbent on spending many resources
for foolish consistencies.

"many resources" is a bit far-fetched. Saving documents as .html
instead of .php is not "many resources".

Gosh you still don't seem to grasp the issues here...
It's like making a great watch, then using bits of old band-aids
for a strap. Hardly. It's more like making a great watch and then adorning it
on the inside where nobody can really see it.

No, as people do see URLs. That's the essence of a website.

My god how moronic can a person be! The essence of a website is the part
below the URL not the URL. People use them for marketing, put them on advers, print them on
t-shirts, use them for tracking, etc.
If you were really concerned about this, wouldn't the best
solution be to remove 'extensions' from URLs entirely? If you
want to relieve the user of this 'burden', then hiding the
mechanics should be the ultimate goal. Now you have it :) I moved from the .html-only set-up to my own
site engine, which does indeed do away with extensions altogether.

Where might that be?

umm on the web server? Where do you think? Under the kitchen sink? :)

Now you're being obtuse. Why to I get the sinking feeling that I'm
wrestling a pig in the mud....
But once you have code great HTML, great CSS, great PHP, and you
server is quick, smooth and working well, it doesn't make sense
to just stop making your site better. You've neglected to define what "better" is. All you've said is
that the URLs should end in .html. I've never heard a single
person say to me "Yeah great site! But their URLs don't end in
.html so I'm never going back" and I don't think you have every
heard that either!

Better = as you want it.

Sounds to me that what you really meant is "better = as 'd' wants it".
We (the other 99.9%) want it as .php. Ergo our web sites are already
"better". Making concessions on presentation due to perceived limitations of
your setup is not "better". There ya have it. We want .php (*YOU* want .html but nobody else does).
Ergo there is no concession on presentation at all and our web sites are
already "better". Case closed, argument done (Next idiot!).
I won't stop until my site is as perfect as possible. A sure sign of a neurotic person!

Or someone bidding for a contract. Arguably they are the same ;)

Right... Hope you got your meds....
I have six locks on my door all in a row. When I go out, I lock
every other one. I figure no matter how long somebody stands there
picking the locks, they are always locking three.

The above, from one of my randomly selected sigs, is another example of
a neurotic person. You should like him - he's Steve Wright. Bet he
insists on .html too! :-)
--
Some people say "life is short". What?? Life is the longest damn thing
anyone ever does!! What can you do that's longer?

Jan 27 '06 #52
d wrote:
"Andrew DeFaria" <An****@DeFaria.com <mailto:An****@DeFaria.com>>
wrote in message news:43***********************@news.sonic.net...

d wrote:

Here's a hint - they couldn't give a rat's ass what the
extension is.

Not everyone, but some people. No most people! Take this thread as an example. You are arguing to
have .html at the end of every URL even if the file contains PHP
or another scripting language. At least 4 people in this thread
alone disagree with you. That would be 80% agree with me and 20%
agree with you (with you, the only person mind you, in your camp).
By that very figure you are in the minority and I'd venture to
guess the the number of people who really, really care about such
trivial things such as yourself is probably closer to .1% in the
real population.

Now who's talking about ridiculously small sample sizes. This is not
a popularity contest. I am not so insecure as to require pats on the
back from my peers to be confident in what I'm doing. I can look
through my CV to see that I'm doing well. And I would hardly assume a
usenet group dedicated to coding PHP as representative of the public
at large :)

Not at all. I've already explained this in another post. Go read that.
And if you cater for those people, it suddenly gets very important. Yes to all of those neurotic people I supposed...

No, as I said - if they pay your bills, you don't leave anything to
chance.

I've found it best not to work for or with neurotic people. YMMV.
I do understand that - but my browser also understands ftp
protocols as well as many other types (gopher (remember gopher),
mailto (a pseudo thing at best but still - it's in there), telnet,
ftp and others. There all part of the RFCs. Indeed the whole thing
about the browser and the World Wide Web was to tie these
desperate, different and confusing to the layperson protocols in a
point and click interface. That's why URL's were conceived and
conceived to handle not just http, but other protocol types. Just
because http is the most popular does not mean it's the only part
of the web. Indeed that's one of the very reasons why the original
(well as of 3.0 and greater) Netscape included a mail reader, news
readers, etc.

Yes, but your WEB browser ceases to be a WEB browser when it leaves
the WEB - see? The "web" is not just transactions of http protocol. See?
It's not a fetish. It's called presentation. No it's called necrosis! As for presentation what's important is
*CONTENT* stupid!

When you start writing sites for big clients with big requests and big
ideas, that assertion will seem as foolish to you as it does to me.

Not a single other person is on your side WRT to this. You can't see that?
When you run such puny tests it's extremely hard to say. You are
also not in a controlled environment in any way, shape or form. A
discrepancy such as you claim can easily be explained but a small
demand on the server from anything from cron to a swap.

Please tell me about how you know about my setup :) I'm intrigued to
know ;) I don't - which is the whole point. You first came on here saying just
150 files. Now you're upping that number to 7500 and saying 50
iterations. You clearly have a neurotic agenda to promote your opinion.
It's hard to trust your numbers and environmental setup, which appear to
be small to start with. We would need a 3rd party confirming this.
You wouldn't want your design sloppy, I don't find it sloppy. Indeed I find it very logical.

Logical from the web server's perspective, not the user's.

As a user I find your answer odd. I also find it logical from a
user's perspective. I would find it illogical for it to say .html
when I know that .html represents static HTML yet I got a dynamic
page!

HTML represents the content, not how the file was generated.

No, html files represent static web content - as defined in the RFCs.
For dynamic content, originally, one had to use CGI. Later Perl, PHP,
ASP and other technologies came around. .html files have always
represented static content.
As websites are coded to make the user happy, not the webserver,
that's a pretty poor excuse. Yes you are using pretty poor excuses! Stop that!

Hardly.

Yes, I see you are continuing, and I am tiring of this.
so why your URLs? The site is a whole - asking someone to
ignore the mess in the address bar because "it's just the
way the web server works" is a bit silly. It's supposed to
work for you, not the other way round :) Again, nobody cares about what characters are in the URL. If
they did they'd start screaming about the silly http:'s and
the &parm=<long assed string of junk characters> and the
like. The .php or .html at the end is one of the least things
to be concerned about!

Just saying "but nobody cares" doesn't make them not care.

3 other people have repeated what I said - Nobody cares. You are
the sole person saying that people care. That's a 80 to 20%
against (guess who?) - YOU.

Oh shit! 3 people!

As opposed to your just 1 person. Hey, I win! I win! From a newsgroup filled with some really abysmal coders. Wow. What
real peer review that is. The Creme de la creme of development, surely. Don't negate the fact that you are the only one arguing for this silly
consistency! Even the writers of Apache disagree with you - but hell
what do they know!
And as for the query string - I agree with you. I don't use
query strings.

Your sites then must not have very much functionality or utility -
but their URLs look nice! ;-)

Tell that to the clients who pay lots of money for them. They seem
rather happy with them.
Just because it's least concerning doesn't make it not concerning
at all. It's like making a painting and putting it in a crappy
frame.

No, again, it's like making a painting then scribbling on the back
of the painting that nobody sees nor cares about.

But people do see the URLs. The URLs are used all the time.

OK, it's like making a painting then scribbling your tiny signature in
the corner - a practice done all the time and guess what? Nobody says
"I'd buy that painting except for that signature in the corner. That
dude has terrible handwriting so I'm not buying". Funny thing is that
you actually buy into such thinking.
--
Ever notice that anyone going slower than you is an idiot, but anyone
going faster is a maniac?

Jan 27 '06 #53
On 27/01/2006 00:52, d wrote:

[snip]
I don't code sites for just your average user. If you're selling
your company, or indeed a product, to people who know, then things
like this speak very highly of the attention you pay to your work.
Assuming that those 'who know' agree with your particular philosophy. As
evidenced in this thread, not all will and that may lead to a negative
evaluation of your capabilities.

[snip]

[MLW:]
If you were really concerned about this, wouldn't the best solution
be to remove 'extensions' from URLs entirely? [...] hiding the
mechanics should be the ultimate goal.


Now you have it :)


It's not exactly a new idea.

[snip]
[...] you haven't actually stated what these tests specifically
entailed [...]


I did.


You gave a vague description.

[snip]
My site engine uses ONLY human-readable urls. No digits, no
ridiculous query strings (in fact no query strings at all), and all
can be interpreted and even re-written by the user if they want.


And that's fine, laudable. It means nothing as far as 'extensions' in
URLs are concerned, though.

Mike

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Jan 27 '06 #54
Andrew DeFaria <An****@DeFaria.com> wrote in news:43da486e$0$96016
$7*******@news.sonic.net:
Again I explained this already. I'm not gonna repeat it.


Andrew, give it up and KF the idiot like I did. If he has a server, he
can do as he pleases, otherwise he won't get anywhere with his idiocy.

Everything he has said is totally unfounded and I don't have time for
idiots.

--
Stan McCann "Uncle Pirate" http://stanmccann.us/pirate.html
Webmaster/Computer Center Manager, NMSU at Alamogordo
http://alamo.nmsu.edu/ There are 10 kinds of people.
Those that understand binary and those that don't.
Jan 27 '06 #55
On Fri, 27 Jan 2006 14:34:20 +0000, d wrote:
A site engine is not a web server. A site engine is a website framework
that sits on a web server of your choice. And why is it off-topic? I don't
see apache anywhere in the newsgroup name.

Are you writing it in php? if not, how can it be *on* topic?

Jan 27 '06 #56
Can you stop posting your stuff in html as well, please? This is a
text-based ng.
Jan 27 '06 #57
Stan McCann wrote:
Andrew DeFaria <An****@DeFaria.com> wrote in news:43da486e$0$96016
$7*******@news.sonic.net:
Again I explained this already. I'm not gonna repeat it.

Andrew, give it up and KF the idiot like I did. If he has a server, he
can do as he pleases, otherwise he won't get anywhere with his idiocy.

Everything he has said is totally unfounded and I don't have time for
idiots.

Pretty much my thoughts too. Hey I tried (I don't know why).

Plonk - By d, Dave, whatever...
Jan 27 '06 #58
Steve wrote:
Can you stop posting your stuff in html as well, please? This is a
text-based ng.

I will respectfully answer - No. There. Now you know.
Jan 27 '06 #59
d:
I mean as in you are showing the world what technology you're using :)
Nothing wrong with that, in itself.
The pages are spitting out HTML, and so logically should have a .html extension
when the browser sees them


"Logic" aside, why *should* URLs have .html suffixes? Why *should*
they have .php suffixes? What exactly does this hypothetical URL point
to?

--
Seoc

Jan 28 '06 #60

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

Similar topics

14
by: saayan | last post by:
Hi, I am using PHP 5.0.1 with Apache 2 on Win XP (SP2). My index.php file has require_once contents.php and also for functions.php. My contents.php file also has a require_once for...
18
by: bb nicole | last post by:
Below is my php code which i need to save the jobseeker resume in database. But does not function and show the message: Column count doesn't match value count at row 1 after i add a field name...
12
by: comp.lang.php | last post by:
I am using CLI PHP to run a PHP script, c:\wamp\php\php.exe, but instead of executing my script, it's actually displaying the raw code instead. How can I run my code using CLI PHP? I installed...
1
by: sandeepifw | last post by:
plz help I have a php variable $content on page menu.php now i wnt to use its value on page menu_items.js hear menu_items.js create a menubar.its contan both static and dynamic menu my...
17
by: priestyuk | last post by:
Hi everyone: D, I recently purchased a very smart and ‘expensive’ template from . You have to install it on your site etc putting in your mysql details, e-mail address, license key etc. So far...
10
by: sickboy | last post by:
Hey everyone, I am working on a new site, ForceFedTV.com and I have gotten reports that the site runs great on mac, but once loaded on a pc, after clicking a few links then going back to the home...
0
by: Benjamin Grieshaber | last post by:
Hi, I´m on SuSE 9.3 with xmlrpc-c and xmlrpc-c-devel installed (ver. 0.9.10) I tried to compile php with xmlrpc support and got the following errors: ...
9
by: mekalai82 | last post by:
i have information.php file that file contain following coding <?php echo phpinfo(); ?> while i calling the URL ("http://localhost/information.php"). i am getting the coding <?php echo...
0
by: Patriot89 | last post by:
I have a quick question in reference to php file extenstions... I have code for example like this... This is all located on this site www.ixalliance.com/BHS/Default (This is my nav.php file) ...
5
Chrisjc
by: Chrisjc | last post by:
Good afternoon, I am seeking some php configuration help. Here is the run down I am running Windows server 2003 and IIS V6.0 I have never had issues before until now. I have Symantec Antivirus 11.0...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.