close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Digital File Pro - Not Working

Thread began 9/10/2009 4:28 pm by bbifl346249 | Last modified 9/10/2009 8:15 pm by bbifl346249 | 1135 views | 3 replies |

bbifl346249

Digital File Pro - Not Working

Here's my PHP code;

<?php require_once("WA_DigitalFilePro/HelperPHP.php"); ?>
<?php
WA_DFP_SetupDownloadStatusStruct("WA_DownloadResult1");
if(isset($_POST["download"])){
WA_DFP_DownloadFile("WA_DownloadResult1", ".secure/MasterSW/RMPs/", "Test.pdf", "[FileName]", false, false, false, "", "", "", "");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
<input type="submit" name="download" id="download" value="Download" />
</form>
</body>
</html>

And yes, the file is present on the server.

When I press the button, nothing happens ?

Any and all help gratefully appreciated.

Attached Files
HelperPHP.zip
Sign in to reply to this post

Jimmy Wu

Looks like this may be caused by the "." in front of the folder path that you have specified for where the file is stored that you are downloading. The reason that nothing is happening after submitting the form is that the item being downloaded is not being found at the directory specified.

Try changing ".secure/MasterSW/RMPs/" to "secure/MasterSW/RMPs/" and make sure that the Test.pdf file is stored in that directory.

Sign in to reply to this post

bbifl346249

'.' doesn't change anything

Thanks for the suggestion Jimmy.

It still does not work.

I also created a new folder "Download" on the root, and placed the pdf file in that folder.

I then modified the DFP settings in the PHP to;

<?php require_once("WA_DigitalFilePro/HelperPHP.php"); ?>
<?php
WA_DFP_SetupDownloadStatusStruct("WA_DownloadResult1");
if(isset($_POST["download"])){
WA_DFP_DownloadFile("WA_DownloadResult1", "Download/", "Test.pdf", "[FileName]", false, false, false, "", "", "", "");
}
?>

This also did not work. I did try typing a URL directly to the file, in the browser, and this opened the file OK. So I know the files is there !

If I put this text at the start of the PHP file; <?php echo(realpath('Download/')); ?>

The path is reported as "D:\Hosting\2861511\html\Download\"

Does this affect, in anyway, the path I should enter in the DFP settings above ?

What next ?

Sign in to reply to this post

bbifl346249

Sorted !

Appears that the download will not work when the .PHP file is in the root !

Moved the .PHP file to a sub folder "Download" and ensured the path was set as "../" when pointing to the file to be downloade, worked perfectly !

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...