I am getting a weird x0cree added on to the file name of “name.ts”. I use scripts VERY similar to this one and they work fine, The only difference being the $localdir variable. I also tried chdir “s:\free”; as well with no luck…
This is my information:
This is my error:
[Mon Aug 04 16:13:31 2008] [error] [client 192.168.0.69] Cannot open Local file S:\x0creename.ts: No such file or directory, referer:
[Mon Aug 04 16:13:31 2008] [error] [client 192.168.0.69] at C:/CGI-bin/Encore.pl line 10, referer:
This is my script Encore.pl:
Please note that the s: drive is in fact a mapped network drive.
This is the html form that calls the script:
Any help would be great!
Thanks!
Marc Viste
This is my information:
This is my error:
[Mon Aug 04 16:13:31 2008] [error] [client 192.168.0.69] Cannot open Local file S:\x0creename.ts: No such file or directory, referer:
[Mon Aug 04 16:13:31 2008] [error] [client 192.168.0.69] at C:/CGI-bin/Encore.pl line 10, referer:
This is my script Encore.pl:
Code:
#!C:\Perl\bin\perl.exe
use CGI;':standard';
use Net::FTP;
my $q = new CGI;
my $thefile = $q->param('filename');
$localdir = "S:\free";
$ftpobj = Net::FTP -> new ("192.168.0.2");
$ftpobj -> login("guest","guest");
$ftpobj -> binary;
$ftpobj -> put ($localdir.$thefile);
$ftpobj -> quit;
unlink "$thefile";
print "Content-type: text/html\n\n";
print "\n<html><head>";
print "<title>Uploading Complete</title>";
print "</head>";
print "<body><h2>Uploading Complete</h2>";
print "</body></html>";
Please note that the s: drive is in fact a mapped network drive.
This is the html form that calls the script:
Code:
<form action="/cgi-bin/encore.pl" method="post"> Enter File Name: <input type="text" name="filename" /> <input type="submit" /> </form>
Any help would be great!
Thanks!
Marc Viste