Sorry,
got it working with your advice:
opendir(DIR, "G:/FTP/Ski") or die print "Error $!"; worked in the end...
Damn these slashes :-D
Thanks for the help
--
View this message in context:
http://old.nabble.com/How-to-get-a-file-listing-tp27644565p27668922.html
Se
s to the root? (even that will be pointless as I'm on WINXP where I
have multiple drives.
Apache knows the context, PERL does not.
Fully qualify that directory name and it should work.
--
View this message in context:
http://old.nabble.com/How-to-get-a-file-listing-tp27644565p27668907.ht
Apache knows the context, PERL does not.
Fully qualify that directory name and it should work.
On 2/20/2010 1:01 PM, ceauke wrote:
Hi there
Here is my code. I get the IMG displayed but also the perl error: No such
file or directory.
"
#!E:\ea12\apps\tech_st\10.1.2\perl\5.6.1\bin\MSWin32-x
bin. my /ski folder is out of the root. I have
an alias, directory and location defined in httpd.conf for it. How do I get
perl to see it?
--
View this message in context:
http://old.nabble.com/How-to-get-a-file-listing-tp27644565p27668252.html
Sent from the mod_perl - General mailing list archive at Nabble.com.
Hi i asume you using xamp and test.gif is a simple git picture?
The apache webserver will try to execute
myserver.com/cgi-bin/mydir/test.gif
put the picture anywhere else (eg C:\xampp\htdocs\mydir\).
Maybe there are some more infos in your log file (eg.
C:\xampp\apache\logs\error.log)
You ca
ther issue is that even if I put xxx as the dir to open, I never get the
die text?
--
View this message in context:
http://old.nabble.com/How-to-get-a-file-listing-tp27644565p27645284.html
Sent from the mod_perl - General mailing list archive at Nabble.com.
Depending on your server setup, you may or may not be able to read
\mydir2\. Whether on windows or a unix variant, apache is configured to
run as "some user" (often, "nobody" on unix); and that user needs to be
given at least read access to the \mydir2\ directory in order for this
to work.
A
On Thu, Feb 18, 2010 at 13:20, ceauke wrote:
> So my structure is like this:
> \cgi-bin\myprog.cgi < my program
> \cgi-bin\mydir1\ <- this one can be seen by my program
> \mydir2\ <- how do I show this content?
opendir my $DH, '\mydir2\' or die "Unable to open mydir2: $!";
The
seen by my program
\mydir2\<- how do I show this content?
--
View this message in context:
http://old.nabble.com/How-to-get-a-file-listing-tp27644565p27645041.html
Sent from the mod_perl - General mailing list archive at Nabble.com.
opendir(DIR, "/your/dir");
my @gifs = grep { /\.gif$/ } readdir(DIR);
ceauke wrote:
Hi guys
I wanted to do a simple script to show all pictures in a specific folder.
But I don't see any functions to read all files in a folder.
The logic needs to go something like this:
- Open directory to read
Sorry, I completely forgot to say.
This is for MOD_PERL on apache. So I want the webserver to show an unknown
amount of pictures.
--
View this message in context:
http://old.nabble.com/How-to-get-a-file-listing-tp27644565p27644823.html
Sent from the mod_perl - General mailing list archive at
#!/usr/local/bin/perl
chdir("/path/to/my/directory");
while($filename=<*.gif>)
{
print "$filename\n";
}
# Enjoy!
ceauke wrote:
Hi guys
I wanted to do a simple script to show all pictures in a specific folder.
But I don't see any functions to read all files in a folder.
The logic needs t
this message in context:
http://old.nabble.com/How-to-get-a-file-listing-tp27644565p27644565.html
Sent from the mod_perl - General mailing list archive at Nabble.com.
13 matches
Mail list logo