Copy link to clipboard
Copied
When I want to download a PHP file from my testing server to my local directory, Dreamweaver CS5 runs the PHP code and delivers a file with the data from the database rather than the PHP code. How do I get Dreamweaver to just give me the code? (I'm trying to revert from the uploaded file to what I have locally.)
Thanks,
Gary
Copy link to clipboard
Copied
If I understand you, use dreamweaver and go to the testing server and "Get" the file. It should be copied to your local folder. You can also use your operating file system of going to your testing server, usually in the htdocs folder and copy the file and paste it into your local folder.
Gary
Copy link to clipboard
Copied
Thanks, but that's not my issue. Those are normal ways to get the file from testing server to local machine. (And, by the way, my testing server is separate from development machine.)
This issue is that when I do the download, the file I get has the database data, rather than the code that generates that data. It's like the PHP script is being executed before the download occurs. I don't get the original file. I get it's result.
Regards,
Gary
Copy link to clipboard
Copied
Please list the exact steps you take to download the file.
Copy link to clipboard
Copied
Show the Files pane. Connect to testing server. Click on the file on the testing server. Click the download button.
GS
Copy link to clipboard
Copied
>Click the download button
Download button? Do you mean the 'Get' button? The Get button executes an FTP get. Since it's an FTP command and not http, it can not execute PHP. Is it possible that someone inadvertently uploaded the rendered php page source code?
Try getting the file with a different ftp application, but I can't believe anything in DW could cause this behavior.
Copy link to clipboard
Copied
The button says "Get files(s)..."
I'm using WebDAV, not FTP, to access that server.
This must be some sort of permissions or firewall issue. When I use the Compare tool (right click on local file and choose "Compare with testing server"), the BBEdit comparison shows the PHP code on the right, local file, but none of the code on the left testing server, with the left showing data instead. Yet I had just uploaded the file to the testing server. The local and testing dates and times match. I know they are the same file.
Gary
Copy link to clipboard
Copied
Gary Sprung wrote:
I'm using WebDAV, not FTP, to access that server.
That's where your problem lies. See the following Help page: http://help.adobe.com/en_US/dreamweaver/cs/using/WSc78c5058ca073340dcda9110b1f693f21-7ebca.html.
The note at the bottom of the page has this to say: "WebDAV may be unable to properly check out any files with dynamic content like PHP tags or SSIs because the HTTP GET renders these as they are checked out."
Copy link to clipboard
Copied
Thank you, David. This does sound much closer to the right diagnosis. Yet this is brand-new behavior for my setup. This WebDAV process in Dreamweaver has worked well with my PHP servers until recently -- not rendering the code during download. I have fiddled with numerous server and Dreamweaver settings recently so I must have changed something that caused the new behavior.
Copy link to clipboard
Copied
If you're trying to revert to the local file, couldn't you just upload that one? Or has it already been replaced with the renderednversion that you downloaded?