Jump to content

Download via PHP from NETAPP


Reiskeks
Go to solution Solved by Reiskeks,

Recommended Posts

Hello everyone

 

Now, that my links to files on a NETAPP Server work, the download wont. 

 

It gives me the Error 404 "File or directory was not found" back. 

 

httpd.enable is on on the netapp and the websites uses a user for connection that has admin rights.

 

Is there anything i can try to make the downloads work?

 

Thanks for your help beforehands

 

Link to comment
Share on other sites

<?php

error_reporting(E_ALL);

 

$dir = '//DERFPFNAP001/all.rb/ISO-Dokumentation/4-Formblaetter/';

 

foreach(glob('//DERFPFNAP001/all.rb/ISO-Dokumentation/4-Formblaetter/*') as $key => $file) {

$filename=basename($file);

 

 

echo '<li><a href="'.$file.'">'.$filename.'</a></li>';

}

 

?>

 

 

the code reads the files in the directory and shows them but the download isnt possible..

he gives me the error 404 back.

 

 

I really dont know what further information i could give?!
Link to comment
Share on other sites

I acidentially posted the old code before...

This is the current code:

 

 

echo '<li><a href="//pathtofile/'.$file.' "    download="/pathtofile/'.$file.' ">'.$filename.'</a></li>';

 

when i try this code with a file within the root directory of my website it works...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.