Help - Search - Members - Calendar
Full Version: the difference between .htm and . php?
HTMLHelp Forums > Programming > Server-side Scripting
adobaelah
okay I have never mess with .php and I know basic html pretty good. I recently got a job re-working a site, and when I pulled the files out of the server I found out they are all .phps . I dont wanna mess with it without knowing what I'm getting myself into. I did some research online but having a hard time understanding. I know .php is a dynamic web page and a programming language, but thats about it. if someone could explain the basic differences of the two and any tips on working with php that would be great.

Thanks a bunch

p.s is there any good website for this particular problem??


Brian Chandler
First, the ending on the file name (.htm, .html, .php, .etc) is not really important - you could have .htm files which are actually php scripts, and vice versa.

An HTML file is simply the text to be sent to the browser; but a PHP script is a *program* (in php) that generates the text to be sent to the browser. A knowledge of html will not help you rewrite a php program. But on the other hand, large parts of the program may just be chunks of html ready for output.

The PHP manual is here: http://php.net/
Generally it is very well written, and easy to use. (You might need to learn some basic programming concepts first though)

Darin McGrew
How much programming experience do you have?
adobaelah
I dont have much programming experience in fact very little. I guess I'm in for a rough ride. I will have utilize the web library
Tom H.
Also, if you are accustomed to editing and previewing files on your local computer, then uploading to the server, you may have to change your workflow. To see how the pages render, they must be delivered to the browser from a PHP enabled web server. This means you'll have to make your edits to the files on the remote server, or else set up a web server and PHP on your local machine. If your PHP pages pull content from a back end database, that's another consideration.
adobaelah
Thanks Tom thats very helpful. I set it up the server and all through dreamweaver, but I guess if thats the case I'll just have to make changes on the remote server directly. How do I set up php on my local machine. Is it a software or is it something else??
Darin McGrew
Please see the FAQ entry Where can I learn about PHP?
pandy
QUOTE(adobaelah @ Oct 12 2007, 01:07 AM) *

but I guess if thats the case I'll just have to make changes on the remote server directly


One thing to keep in mind here. If you make a mistake with the PHP code, as for example delete something by mistake when you just intend to change the HTML or write something in the wrong place, your site will stop to work, you'll just see a big fat error message. So, set up a dev sub or directory where you can play around without harming the live site. When you are ready for the real deal, save a backup before you change a live document.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.