|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I'm going to be developing a PHP-based site, but don't need to set up any live
database connections in DW. However, I'd like to test my code locally, so I will be installing the Apache web server and PHP extensions to be accessible via "http://localhost/..." etc. To do this, I assume that I should define my site so it is based in a subdirectory under the web server's directory tree. But is there a way to use DW's browser preview feature and have it use a local web server connection instead of accessing the page by a direct file reference? That is, preview "http://localhost/myproj/index.php" instead of "C:\something\myproj\index.php", which is not at all the same thing? Any other tips for local PHP-based development? |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
> That is, preview > "http://localhost/myproj/index.php" instead of > "C:\something\myproj\index.php", > which is not at all the same thing? when you enter testing server info into a Site Definition, dw uses the "http prefix" entered as the beginning of the url to use when F12 is pressed. in other words- IF you define a testing server, an F12 will bring up http://localhost/whatever/thatpage.php -- Alan Adobe Community Expert, dreamweaver http://www.adobe.com/communities/experts/ |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Thanks, Alan. I had read something about the testing server, but it was not clear exactly how all the pieces fit together.
|
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
> Thanks, Alan. I had read something about the testing server, but it was not > clear exactly how all the pieces fit together. Yes- if you declare a testing server in the site definition, dreamweaver changes the way it does F12 Preview in Browser. Instead of sending the code to the browser, dw using the info entered about the Testing server to send the relevant files to the proper location (either a locally installed testing server folder or even a remote ftp location, you can use your remote host or a subdomain of the site as the testing server. There's a lag while the files get transferred though) then opens the browser with the "http prefix" of where the testing server site can be seen. Usually we get asked this question in the other direction; people who don't need a testing server for their Site definition fill in information for it mistakenly. Then can't understand why they get a 404 error message when they hit F12 to preview their plain html pages. Install the server and PHP and MySQL, get that part working. Then define the site in dw, and fill in the Testing Server information. Tip: If you know what most of the terms mean, the Advanced tab in the New Site Dialog box is easier to fill out than the "wizard" step by step version. -- Alan Adobe Community Expert, dreamweaver http://www.adobe.com/communities/experts/ |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
[q]Originally posted by: Newsgroup User
Yes- if you declare a testing server in the site definition, dreamweaver changes the way it does F12 Preview in Browser. Instead of sending the code to the browser, dw using the info entered about the Testing server to send the relevant files to the proper location (either a locally installed testing server folder or even a remote ftp location, you can use your remote host or a subdomain of the site as the testing server. There's a lag while the files get transferred though) [/q] So is it OK to actually have my working DW folders be the same ones that my local web server uses? In other words, no transfer to the testing server would be required because the files would already be there. This would work out well for the way I do my work, but would it confuse DW at all? It sounds from your reply like DW wants to transfer the files from my working site directories to another directory on my PC where the web server operates. Or maybe I just have to try all of this and see what happens... |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
> So is it OK to actually have my working DW folders be the same ones that my > local web server uses? Yes, you can do it that way. Or you can have the Local Site Folder and Testing Server Site Folder in different locations, then dw will take a second to transfer the current work file to the testing server location then open the browser. The main thing is to get the Site Definition info correct for what you want to set up. -- Alan Adobe Community Expert, dreamweaver http://www.adobe.com/communities/experts/ |
|
![]() |
| Outils de la discussion | |
|
|