Title: List files from a share of a windows client

Hello all,

How can I list the directives and files from a share which is on a windows client? I can only list the directories from the local machine, not from a remote one! If I catch a image with my code below, it works fine.

I start the browser with: http://<servername>/<cgi-file>?ordner=../&logo=//<sharename>/pic.jpg
(To display the local directive/files and an image from a remote windows
machine)

If I start the browser with: http://<servername>/<cgi-file>?ordner=//<sharename>/&logo=//<sharename>/pic.
jpg
(I thought this one works with the directory/files from the remote machine, but I get the error msg with: Can't open directory. Also if I change the "slashes" to "backslashes" or with the ip-address)


My actually code is:

...
>
>  #!/usr/bin/perl -w
>
>  use CGI;
>  $query = new CGI;
>
>  print $query->header();
>  print $query->start_html();
>  print "<table border=0 cellspacing=0>";
>  print "<tr><td>";
>
>  #reading the directory
>  opendir(DIR, $query->param("ordner")) || die "Can't open directory!"; 
> while($datei = readdir(DIR) ) {  print "$datei<br>";
>  }
>  closedir(DIR);

>  #This is only optional, to test if images can displayed (it works
> fine)  print '</td></tr><tr><td width=100><img
src=""file:'.$query->param("logo").'" align=center></td>';
>  print "</tr></table>";
>
>  print $query->end_html();
>
...

I need this configuration, cause to move our intraweb to a Linux Box with Apache. Later I'll have to generate hyperlinks to different files on the remote machines, therefore I have list first the content of the directory. Actually it runs on a Windows machine with perl and sambar and the files and data are on different machines.

There it works fine.
And I can't move the files to the Linux Box. Not yet, and not at all!!!


Thanks for the help.

Regards,

Christian Heiss


_________________________________________________

LANconcept Moll GmbH
Benzstrasse 1
88074 Meckenbeuren
 
Voice:  +49 (0) 7542 940 3 - 18
Fax:    +49 (0) 7542 218 24
Mobil:  +49 (0) 175  86 91 805
<mailto:[EMAIL PROTECTED]>
visit our website <http://www.datentechnik-moll.de>
_________________________________________________



Reply via email to