|
It may have just been a type-o but your $CUR_DIR variable is missing an end quote and a semicolon. Also it wouldn't print anything on your local dir because of the way readir works. From the docs:
"If you're planning to filetest the return values out of a readdir, you'd better prepend the directory in question. Otherwise, because we didn't chdir there, it would have been testing the wrong file."
Finally it's possible the user that runs the cgi script on the server (ie user "nobody" in unix) may not have permissions to open this network resource.
hope this helps.
-Wayne
-----Original Message-----
I have this bit of code in a cgi script and cannot seems to get it it work. Is there any problem in calling the opendir command from a cgi script?
It always comes back with cannot opendir directory. If I give it a local path instead of remote path, it open but prints nothing. Any ideas Thanks in advance
$CUR_DIR = "\\\\myserver\\e\$\\dir1\\dir2
opendir(HOMEDIR, $CUS_DIR) || die "can't open customers home
directory:$!"; } Do you Yahoo!? |
- cgi script and opendir command Tfbsr Bertrand
- Re: cgi script and opendir command Adam Ingerman
- Wayne Simmons
