![]() |
Confused..... .php / .html
What is PHP and why would I want to use it?
The reason I ask is that the holding page for my new website has a .php extension but appears to have been written in HTML (or at least there is HTML in the source code when viewed in Firefox). Anybody able to clear this up for me / tell me when I should be using one instead of the other / why? Thanks. |
Re: Confused..... .php / .html
PHP is a programming (script) language.
|
Re: Confused..... .php / .html
Quote:
http://uk.php.net/manual/en/introduction.php |
Re: Confused..... .php / .html
Ok, thanks for that guys.
I can't see any PHP in the source code though, is there a chance that it's somewhere else? The only thing I can see is a bit of JavaScript that doesn't actually seem to do anything. |
Re: Confused..... .php / .html
Quote:
:) |
Re: Confused..... .php / .html
Quote:
|
Re: Confused..... .php / .html
Quote:
|
Re: Confused..... .php / .html
Quote:
|
Re: Confused..... .php / .html
Quote:
|
Re: Confused..... .php / .html
indeed, you have, as they say, hit the proverbial nail on the head. :)
|
Re: Confused..... .php / .html
Cool, downloaded it and opened using notepad and there's a whole load of code that I couldn't see before. Thanks for your help guys.
|
Re: Confused..... .php / .html
Quote:
|
Re: Confused..... .php / .html
One thing I should add is you can spot PHP code in two ways:
1 PHP Code:
PHP Code:
|
Re: Confused..... .php / .html
There's a nifty bit of Apache (web server), which is bolted on, that goes "Cooooo - someone requesting a PHP page" and nips in, grabs the page, has a read, converts all the programming code to HTML, and hands the HTML to Apache to give to the client. The nipping in bit is where much tweaking goes on to improve the speed of the nipping. It's caused a few problems with this site, I believe? The bolted on bit is called a module, and the conversion process from PHP to HTML code is interpretation - which makes PHP an interpreted language.
The page does not have to have a .php extension - could have .moo Just depends on how Apache is configured. |
Re: Confused..... .php / .html
Quote:
|
Re: Confused..... .php / .html
Quote:
By not using an obvious extension, you deny any potential hacker valuable information about your server and the software it runs. |
| All times are GMT +1. The time now is 11:59. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum