does anyone have any insight into the use of extensions when working with PHP? I am building a site that will have PHP on every page, do I need to use the .php for every file? What is the rule?
@chazzyDec 14.2006 — #you can setup your web server to parse any type of file with any type of application. by default, most web servers parse anything with a php extension as php, and let anything with an html extension get parsed by the client only.
@aprice42authorDec 14.2006 — #I don't have control over the web server, so I won't be able to go that route. anything with an html extension get parsed by the client only[/QUOTE]
@bvg123Dec 15.2006 — #Since you don't have control over the web server, you will most likely have to use .php extension. To test whether you can use .html, put a simple php script into an html file, upload it to the server, and view the page in your browser. If the page displays the raw php code, then you can't use .html. Hope that helps.
@NogDogDec 15.2006 — #If you are on an Apache server, you can use a .htaccess file in your root web directory (or in its sub-directories if you want different behaviors in different directories) to specify which file name suffixes get processed as PHP. You would use a command like the following in the .htaccess file to tell Apache to process .htm and .html files as PHP files: <i> </i>AddType application/x-httpd-php .html .htm
@NogDogDec 15.2006 — #It's just a plain text file, so whatever you would edit such files with in OSX (I'm not familiar with that OS, so don't know the specific tool names).