Jump to content

Download via PHP from NETAPP


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
https://forums.phpfreaks.com/topic/297617-download-via-php-from-netapp/
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?!

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...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.