|
|
Post a Project »
Find a Professional HTML Freelancer!
Find a Freelancer to help you with your HTML projects
| |
|
 |
|
|
|
04-19-2009, 04:04 PM
|
HTML or PHP?
|
Posts: 62
Name: Andrew
|
Been doing web work for years, and can't believe I've never thought about this more.
Why would a web developer use html pages instead of php pages(or asp)? It seems to me you can do everything in a php page that can be done in an html page (or htm, shtml), but php has many more possiblites - cookie management, serveral variables, force downlaods, user management, thousancds of scrpits, etc.
Am I missing something here? Do html pages have capalbites that cannot be accomplished with php? I'm considering this becuase we have a new site and I was considering changing all the pages to php (from shtml as they are now). Any suggestions greatly approectiated.
|
|
|
|
04-19-2009, 05:19 PM
|
Re: HTML or PHP?
|
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
|
There is no such thing as a web page that does not use HTML.
__________________
I build web things. I work for the startup Please login or register to view this content. Registration is FREE
.
|
|
|
|
04-19-2009, 07:58 PM
|
Re: HTML or PHP?
|
Posts: 62
Name: Andrew
|
I'm sorry - should have been more clear. I was referring to the file type of the page. I realize for example, in a php page (ends in .php), html is used in the code, but the file extension is php. This is what I'm curious about - what, if any, are the benifts of using a .html file extension instead of .php? Thanks for any suggestions.
|
|
|
|
04-19-2009, 08:01 PM
|
Re: HTML or PHP?
|
Posts: 258
|
there's not really a benefit to either one. PHP is just more dynamic, but it still uses html. for example with php you can include external files which you can't do with html
__________________
Alex
|
|
|
|
04-19-2009, 08:43 PM
|
Re: HTML or PHP?
|
Posts: 62
Name: Andrew
|
yea - it seems like you can do a lot more with php files. I'm just trying to figure out if there is any reason to keep pages as html files. This is a good thing to know before I switch all the files in my site from html to php.
I've always kept most of the files as html files and just converted the ones I needed to over to php files (to add in scripting, etc). But I started thinking, why not just switch them all over? I don't think having php files would effect javascript snippets or any of the other features I use in my html files, but please let me know if there are any limiations to php files compared to html files.
Php files seem so much less-limited. I'm curious why anyone would use html files in the first place? Anyway, any suggestions greatly appreciated.
|
|
|
|
04-19-2009, 11:48 PM
|
Re: HTML or PHP?
|
Posts: 996
Location: Not positive
|
I personally, always use the .php extension as apposed to .html or .htm. In my opinion, it's more flexible and, well, yeah - less-limited.
- Steve
__________________
if($stevej == "helpful") { $talkupation += $user_power; }
|
|
|
|
04-22-2009, 01:43 PM
|
Re: HTML or PHP?
|
Posts: 5
Name: Brad
|
I guess I dont know all that much about php, I have been using the .html extention for years. Html just seems easier in my opinion...that and you have to use html for some things. A website cant be php dependant.
__________________
If you want to make a little extra money from home then click on the link below. CashCrate is easy and free. Please login or register to view this content. Registration is FREE
|
|
|
|
04-22-2009, 03:22 PM
|
Re: HTML or PHP?
|
Posts: 489
Name: Adam
|
Just an FYI you can use the Apache .htaccess files to make any file type process like any other type.
Ex. .blarg files can be processed like .js files.
|
|
|
|
04-23-2009, 12:40 AM
|
Re: HTML or PHP?
|
Posts: 46
Name: sakura
Location: china
|
If you want to have a good ranking in search engine,you had better not change all the pages to php
|
|
|
|
04-23-2009, 12:47 AM
|
Re: HTML or PHP?
|
Posts: 232
Name: John
Location: Tokyo
|
php pages mostly used if you need to deal with database or get data from users and store it in your servers.
html pages run only on the client side so html alone will not be able to get data from users to store it or send it somewhere.
so you should decide either you use php or html depending on your needs.
|
|
|
|
04-23-2009, 09:42 AM
|
Re: HTML or PHP?
|
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
|
<badadvice>
Quote:
Originally Posted by welljy
If you want to have a good ranking in search engine,you had better not change all the pages to php
|
</badadvice>
<goodadvice>
Search engines don't have any idea what language a website's HTML is generated with, nor do they care.
</goodadvice>
__________________
I build web things. I work for the startup Please login or register to view this content. Registration is FREE
.
|
|
|
|
04-23-2009, 10:02 AM
|
Re: HTML or PHP?
|
Posts: 1,187
|
Quote:
Originally Posted by welljy
If you want to have a good ranking in search engine,you had better not change all the pages to php
|
I have heard this somewhere before but I think its a load of baloney.
Search Engines crawl the page AFTER it has been rendered on screen.
So from the SearchBot point of view it doesnt know how the final HTML code got there. Via PHP, ASP, ColdFusion, shtml, html or whatever.
I always use .php for my files for the reason thats already been given.
It just gives so many more options. Using a server side scripting language lets you apply conditional logic to tweak so many things. Static HTML cannot apply conditional logic.
Having said all that, I have one client at the moment who specifically requested me to develop a website NOT in PHP because he wants to take over the day to day maintenance himself with a WYSIWYG editor.
|
|
|
|
04-24-2009, 04:55 PM
|
Re: HTML or PHP?
|
Posts: 37
|
Another good reason to use php is that it can help keep the site consistent by using header, footer, and navigation includes. If you need to update those parts of your site all you need to do is change one file for the modifications to take affect across your entire site.
If you want your clients to be able to manage their content, php and MySql is great for making a simple content management interface too.
|
|
|
|
04-24-2009, 05:23 PM
|
Re: HTML or PHP?
|
Posts: 4,083
|
Without HTML, you wouldn't be reading this.
|
|
|
|
04-25-2009, 07:35 PM
|
Re: HTML or PHP?
|
Posts: 39
Name: jgand
|
PHP is more dynamic and allow some more flexibility, however, html is still used. Having the option to use the one you most comfortable with is most important.
__________________
removed by moderator
|
|
|
|
04-25-2009, 10:36 PM
|
Re: HTML or PHP?
|
Posts: 489
Name: Adam
|
Quote:
Originally Posted by jgand
PHP is more dynamic and allow some more flexibility, however, html is still used. Having the option to use the one you most comfortable with is most important.
|
No, PHP is processed SERVER SIDE. Your web browser will NEVER have to compile PHP code and run it. HTML is the language used to frame websites, without HTML sites would look like plain text files.
|
|
|
|
04-25-2009, 11:43 PM
|
Re: HTML or PHP?
|
Posts: 2,162
Name: ...
Location: ...
|
Search engine placement is the one true thing that sucks with dynamic pages, but with some tweaking around with php you can make those thousand of dynamic pages easily searchable. 
__________________
Made2Own
|
|
|
|
04-27-2009, 10:18 AM
|
Re: HTML or PHP?
|
Posts: 232
Name: John
Location: Tokyo
|
Quote:
Originally Posted by Brian07002
Search engine placement is the one true thing that sucks with dynamic pages, but with some tweaking around with php you can make those thousand of dynamic pages easily searchable. 
|
php pages also are searchable. I believe the problem comes up when you use tons of parameters with your php page. that makes crawler fall in huge amount of duplicated contents which make it hard for dynamic pages to get indexed 
|
|
|
|
04-27-2009, 12:37 PM
|
Re: HTML or PHP?
|
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
|
Quote:
Originally Posted by nayes84
php pages also are searchable. I believe the problem comes up when you use tons of parameters with your php page. that makes crawler fall in huge amount of duplicated contents which make it hard for dynamic pages to get indexed 
|
Duplicate content doesn't make pages "hard to get indexed". Duplicate content makes it hard to predict WHICH page will be indexed. Fortunately, this is no longer an issue, because we can direct search engines towards what we believe should be the indexed page with the canonical link:
HTML Code:
<link rel="canonical" href="http://my-website.com/my-duplicated-page.php" />
This now works for all 3 major search engines.
__________________
I build web things. I work for the startup Please login or register to view this content. Registration is FREE
.
|
|
|
|
04-27-2009, 01:03 PM
|
Re: HTML or PHP?
|
Posts: 3
Location: Chicago, IL
|
if your site has straight html with no backend admin framework it can become a pain to work on, as everytime you add new pages, you need to update several pages and make sure everything is linked together right, if you use or build a php script, it does all this for you automatically, therefore drastically reducing your time doing tasks that can easily be automated.
I recommend to most people to try and use wordpress - download the free software and install on your server, it is a bloggin software, but also works well as a CMS (content management software) - you can arrange the settings and stuff to make it work like a regular website (not a blog) and have all the benefits of a really high end CMS that creates pages, is editable, easy to customize and gets great search engine rankings, especially if you use the right plugins!
|
|
|
|
|
« Reply to HTML or PHP?
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|