4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Perl upload
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
wavevader
Junior WebHelper
Junior WebHelper


Joined: 24 Oct 2002
Posts: 2

PostPosted: Thu Oct 24, 2002 3:20 pm (15 years ago) Reply with QuoteBack to Top

i'm trying to get the following sub-routine running on a NT server.
when exactly the same script is run on a Linux server it works fine, but when it is run on NT no file ($file) is uploaded.
any ideas?

sub UploadFile {
binmode $file;

if (open (UPLOADFILE, ">/storyImages/$filename")) {
binmode UPLOADFILE;
print UPLOADFILE $file;
close UPLOADFILE;
}
else{
return $!;
}
}
OfflineView User's ProfileFind all posts by wavevaderSend Personal Message
Jos
Ex Team Member



Joined: 08 Jan 2002
Posts: 36
Location: The Netherlands

PostPosted: Fri Oct 25, 2002 1:12 pm (15 years ago) Reply with QuoteBack to Top

wavevader wrote:
if (open (UPLOADFILE, ">/storyImages/$filename")) {


On a Unix Server is always used thisslasch ( / )
So try to use ( \ ) in the line and use a full path like C:\...

if (open (UPLOADFILE, ">C:\...\storyImages\$filename")){

I hope this is helping you.
Jos

________________________________
Jos
** Team Member ** http://www.josvanras.com **
OfflineView User's ProfileFind all posts by JosSend Personal MessageVisit Poster's Website
wavevader
Junior WebHelper
Junior WebHelper


Joined: 24 Oct 2002
Posts: 2

PostPosted: Fri Oct 25, 2002 1:59 pm (15 years ago) Reply with QuoteBack to Top

thanks, that's exactly what it was!

double slash though, 'c:\\..\\..'
OfflineView User's ProfileFind all posts by wavevaderSend Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.045985 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme