hey yall
i just started learning php too....but i have a problem with viewing my php files..i am currrently using easyphp and am not sure how am supposed to use it...i use dreamweaver to edit my php files but i dont get to see the output..
so please i need help..

Recommended Answers

All 2 Replies

easyphp is an IDE integrated development environment for php, it contains a local server that can parse php files and support for php mysql html etc
to use it to locally view php files follow the instructions here http://www.easyphp.org/introduction.php
item 5. see the result

dreamweaver doesnt display php well (at all)

you can create a contect menu item for .php files 'open with easyphp' so you can just click on them in explorer

Member Avatar for diafol

To get php websites to work in dreamweaver you'll need to sort out a few files:

C:\Windows\System32\drivers\etc\hosts
Open this in a text editor and the name of your site below the two "localhost" lines:

127.0.0.1       localhost
::1             localhost

127.0.0.1 		wetwork.local

where wetwork.local is the name that will appear after the "http://" bit on your local server. You can call this anything you want, but I use the '.local' suffix to remind me that I'm on local server as opposed to remote.

Next open the httpd-vhosts.conf file (under the main apache directory), using a text editor.

C:\(some directory)\apache\conf\extra\httpd-vhosts.conf

Add this to the end of the file:

<VirtualHost 127.0.0.1>
   DocumentRoot C:\phpsites\htdocs\wetwork_v7
   ServerName wetwork.local
</VirtualHost>

The DocumentRoot line requires the physical windows location of your website folder
The ServerName should be the same as applied in the hosts file.

NOTE - you can add as many sites as you like, just keep adding them to the end of both files.

In order to get this to work, you need to stop and restart Apache (via Task Manager).

In Dreamweaver, open up the Site Definition:

Local Info > Local Root Folder: C:\phpsites\htdocs\wetwork_v7
Testing Server > 
   Server Model: PHP MySQL
   Access: Local/Network
  Testing Server Folder: C:\phpsites\htdocs\wetwork_v7
  URL Prefix: http://wetwork.local/

I've never had a problem with DW/php. However, since taking this approach, I have to have an internet link before the sites will display in a browser.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.