PDA

View Full Version : Viewing PHP file created by Dreamweaver CS3 in a web browser locally


ResB
03-19-2009, 03:16 PM
Hi all,

This is my first post and I'm a total novice with this query.

I've developed a website in Dreamweaver CS3 where all of my pages are PHP. For the last two days I have been able to view the pages locally using the "view in browser" button and selecting Firefox. If I tried to use Internet Explorer I would get a pop-up saying "Do I want to open or save this file", the file being the page I've tried to view, index.php for example. However, Firefox, just opened the PHP file as if it were an ordinary HTML file.

However, all of a sudden without any warning I can no longer view the pages in Firefox. When I try I get the "what do you want to open the file with?" and if I select Firefox I just get a blank page!

I don't have any testing sites set up or have Apache installed or any other server based software for that matter.

Is there any reason why this would just start happening?

Hope you can help.

Regards,

Rich

Ray Borduin
03-19-2009, 03:51 PM
Because you just started naming your pages .php and used to name them .html? That is my guess, but really there isn't enough information to properly diagnose this problem.

ResB
03-19-2009, 04:12 PM
Sorry Ray,

I wasn't perhaps very clear.

The pages were all created from new i.e. file --> new ..> PHP All the pages were bonefide PHP files and I was able to view the pages locally. But now when I try to view the PHP pages I get the pop-up asking if I want to open the file "index.php" where before it would just open in Firefox and display as you would expect.

I didn't rename the HTML files to PHP. I was just using how you would view HTML files in Dreamweaver as an example.

Thanks again.

Justin Nemeth
03-19-2009, 05:33 PM
Since PHP is a web server language, you will get the best results if you view the pages using a web server running PHP. As a temporary fix, you could just rename your files with the .html extension if you aren't actually using any server side code.

ResB
03-19-2009, 05:42 PM
Thank you Justin for the reply.

Can I ask a stupid question please.

When I upload my PHP files to a web server running PHP, should the pages display as you would expect automatically. What I mean is, will the server automatically see that my web pages have the PHP extension and therefore run the relevant scripts to see the pages as intended.

Sorry PHP is a new animal for me.

Regards

Justin Nemeth
03-20-2009, 03:16 PM
Yes, if the web server running PHP is setup correctly .php files will run the relevant scripts like you would expect.

Brad Lawryk
08-05-2009, 05:24 PM
Hi Rich,

If you are on a PC, you should install WAMP, its free and will allow you to view your PHP pages as they are meant to be.

The reason that some of your php pages were viewable and some not may be due to the fact that your early php pages may not have contained any actual php code. Just regular html?

If you eventually upgrade to CS4 then you would no longer need WAMP as the new Live View in CS4 will do the same thing.

Brad

Jason Byrnes
08-06-2009, 05:40 PM
If you eventually upgrade to CS4 then you would no longer need WAMP as the new Live View in CS4 will do the same thing.



To the best of my knowledge, CS4 doesn't include a web server or PHP parser. I don't think Live View in CS4 would allow you to preview PHP pages without wamp installed.

dvpapa51386826
08-13-2009, 06:53 PM
Hello everyone one I am a beginer in PHP & MySQL, please bare with me....
My problem is occuring in Dreamweaver CS3
Well my message is similar to ResB...Before I started using (example.php) I usualy use (.html) for my file names. While using the .html way, I was still able to preview my work on the browser when executing F12. After getting into PHP & MySQL, using the (.php) format everthing went down south for me...I cannot preview anything now when clicking on F12...

Jason Byrnes
08-14-2009, 09:38 AM
There are a number of resources available on our site to help you get started with dynamic web development.

There is the "Web Development: Before you begin" tutorial in the General TechNotes section of any of the product support pages such as the DataAssist support page:
http://www.webassist.com/support/dataassist/

This will walk you through setting up a web server on your computer and configuring the PHP processor so you can serve PHP pages.

In the Training section, there are the Dreamweaver Simulations, the "Setting up your site for dynamic development " simulation will help you with configuring your Dreamweaver site:
http://www.webassist.com/training/resources.php#tab2

If you still find you self struggling, please provide some details on what is going wrong. Are you getting error messages when trying to preview in the browser? a white screen?

Be as detailed as possible, it will help us understand the nature of the problem so we can give better advice.


You really should start a new thread for this rather than tack on to exiting discussion.

ResB
01-07-2010, 05:39 PM
Hi all.

I just wanted to say, I got my head down, got involved in a bit of PHP coding and have actually produced a website which has a dynamic news page and a DB of products which the client can manage through their own "admin" section and users can view the products and news as you'd expect.

Nothing more nothing less, just pleased I was able to do it. :) Of course it isn't perfect but this is the first dynamic site for me and someone actually paid me for it. :)

What a great feeling.

Office Guy-172461
01-07-2010, 05:47 PM
Let me be the first to congratulate you.

Sounds like quite a first dynamic site and you got paid too. :)

Sounds like you're a natural for PHP.

ResB
01-07-2010, 05:58 PM
Let me be the first to congratulate you.

Sounds like quite a first dynamic site and you got paid too. :)

Sounds like you're a natural for PHP.

Why thank you fellow code wizard! ;) I'd post a link but without reading the rules I guess that wouldn't be allowed. Anyway, all it's done is make me have sooo many more questions as I'm one of those who has high expectations of myself and I "always" want to do better. Like how on earth do you store "hard returns" within a MySQL database. Would make the news items look a lot better if they had paragraphs! lol

ResB
01-08-2010, 02:49 PM
Like how on earth do you store "hard returns" within a MySQL database. Would make the news items look a lot better if they had paragraphs! lol

Sussed it. :)