Copy link to clipboard
Copied
Created web pages in DWCS4 in html but discovered because I need some form pages to interact with MySQL that I should have created pages using DW PHP format. Is there a simple way to convert all html pages to php using dreamweaver CS4? OS is Win XP. Have access to hosting company with MySQL, PHP,PHPAdmin.
Copy link to clipboard
Copied
All you have to do is change the .html extension to .php from within the Files tab for those pages with actual php code in them.
That's it.
Copy link to clipboard
Copied
File > SaveAs >filename.php.
Don't forget to delete filename.html pages from your local and remote sites.
Nancy O.
Copy link to clipboard
Copied
I would recommend against Nancy's suggestion here (and it's REALLY weird to see myself typing that).
I say it only because you are working within an existing site that likely already has links going to the .html file you are changing.
If you do a Save As and create a new .php file based on the still existing .html file, you will need to manually change the links on the pages that are currently pointing to the that .html file so they will point to the new .php file. You would need to either open the pages individually and fix the links, or use DW's Find & Replace feature and do a site-wide correction.
However, if you change the file extension from within the Files tab instead, DW will update any pages that link to it automatically.
Copy link to clipboard
Copied
Good call, Jon.
To keep links intact, using the Files panel & F2 to rename each one is safer.
Nancy O.