I am using an Apple Mac and Dream Weaver. I need to use PHP within HTML files. While I have the Dream Weaver site working with ipage.com, I am having a difficult time setting up a local test server. I have installed MAMP and have the Apache and Mysql servers running. My DreamWeaver file is stored as
User/rnharri/Documents/Sites/S/D/test.php. When I configure the site I created
Connect using: Local/Network
Server Folder: /Users/rnharri/Documents/Sites/s/d
Web URL: http://localhost/s/d
At first I got "can not find file:" now every time I run the file it it guides me thorugh setting up a local server and executes the HTML code but ignore the PHP code.
Can anyone tell me exactly what the Web URL: should include and how I can test on my mac to make sure the directories are what I am specifying.
I don't use MAMP. But most Apache testing servers work best if you put your local site files inside the testing server's default folder.
This way your local site and testing server site are one in the same. It makes it much easier to preview files locally because all you have to do is Save them.
If you keep your local site separate from your testing server site, you must PUT files to your testing server folder each time you want to preview. I believe this may be what you're struggling with.
See this step-by-step tutorial (about half way down the page for MAMP):
It doesn't really matter where you host your files and they can be the same location where you work on them as where you save them even if it's not the default location that Nancy eludes to. Can you open MAMP and click on preferences and then Apache and confirm the Document Root is the "/Users" path you typed earlier and that MAMP is running when you test files in DW?
MAMP defaults to Applications/MAMP/htdocs folder and considers this as localhost, unless otherwise you've changed the setting.
You may want to create your site folder within /htdocs and then configure the definition in Dreamweaver. This way, your site will be localhost/s/d and your file path will be htdocs/s/d.
I use MAMP PRO. But, the setting is more or less similar for MAMP (free version) too.
Notice 'Disk Location'. You can change this to your Documents/Sites folder if you prefer working with files from there. Then, restart MAMP. localhost will now point to Documents/Sites folder instead of MAMP/htdocs.