View Full Version : saving to shtml

01-29-2008, 03:38 PM
Hello, I hope someone can help me and it's probably pretty simple (I hope). I've made a bunch of pages in Dreamweaver 8 which were saved to php format for a library in a forum. Turns out I need to save them now in shtml. Is there a way I can make the files save automatically without having to go through all the "Save as" stuff? I saw online there was the option to go to EDIT, PREFERENCES and then under GENERAL make the change.... but the screen doesn't look like the one in the tutorial shows and the option is not available.... i don't know if it's a different version of Dreamweaver or not they are using. Is there a way to automatically save to shtml in Dreamweaver 8?

Thank-you so much

01-29-2008, 05:01 PM
Sorry about the typo in the Title....

01-29-2008, 08:15 PM
corrected the typo

01-29-2008, 08:17 PM
did you write php in those pages

01-30-2008, 07:49 AM
yes, I believe so.

01-30-2008, 08:00 AM
if you change your page extension to shtml your PHP wont work

01-30-2008, 02:45 PM
Oh.... Hmmmmm.... half the pages have been converted already and are showing. But the bossman did it so I have no idea how. I also ftp'd some converted files up, and although I couldn't get them to view, he was able to get them to come up.

How should I proceed, what should I do now? It's several hundred pages.

01-30-2008, 02:52 PM
Okay, I get it... HTML is static and php is not. I better go check how I saved them originally because Bossman flipped them over somehow. But I'm pretty sure I started Dreamweaver by selecting to open a php page.

01-30-2008, 02:54 PM
it works like this

you request a page with a .php extension by clicking a link from a live page

the server identifies its a PHP request and hands it to the PHP engine which processes the code and returns just HTML

if you changed the extension then this wont be handed over to the engine

you are using shtml as includes yes ?

01-30-2008, 03:02 PM
I don't see php in the script anywhere. I was given the header and the footer by my Boss, in which I plugged into a php blank Dreamweaver page and then saved into a php file. Originally I was told all th efiles had to be in php... now that the project is concluded I am told it has to be shtml.

To make sure I am looking in the right spot, where in the script would I be able to tell that it is a php generated page?

01-30-2008, 03:03 PM
just saw your post after I posted the above....... going back to read.

01-30-2008, 03:05 PM
What I was trying to do was open a php saved page and resave it under shtml... was hoping dreamweaver somehow made the conversion when I changed the extention.

01-30-2008, 03:17 PM
nope its not that clever

rememebr that PHP and HTML are as different as wood and water

they are not related in any way

PHP is basicaly instructions for the server to carry out on a request

HTML is the code which defines elements of a page.

if the pages you are converting dont contain any PHP then your conversions will be fine

you can include files using the PHP include method without changing any extensions

add the following to a page which needs to include another with 'page_to_include.php' being the page to include
<?php include('page_to_include.php'); ?>

you have to be working with a php environment for this to work (PHP needs to be installed on the server)

01-30-2008, 03:58 PM
Thanks... I'll have to investigate further...

I don't see any reference to php except the footer file.../footer.php.

Does that mean I am in the free and clear.... maybe?

01-30-2008, 04:00 PM
K, I should ask this for future pages. What should I save pages as... like a generic.... that can be "easily" converted to whatever file a certain server/program needed.

01-30-2008, 04:18 PM

01-30-2008, 04:39 PM
if your building a static HTML site then .htm is the correct extension

if you are using a scripting language like PHP then .php is the answer

you cant rename pages and expect them to change what they do as it doesn't work like this.

you determine what your site will do before you start developing it then that decides what the extension is going to be. There is nothing stopping you mixing the pages up as long as you have the correct technologies installed