| View previous topic :: View next topic |
| Author |
Message |
PilgrimX182

Joined: 22 Mar 2006 Posts: 2106 Location: UFO Lab
|
Posted: Jun 06, 2007 8:46 am Post subject: |
|
|
Use this code instead:
| Code: | | print FILE join(',', map{"'$cg->param($_)'"} qw(comment name emailaddress) ); |
- this will put fields in single quotes. |
|
| Back to top |
|
 |
drumcritic
Joined: 06 Apr 2007 Posts: 15
|
Posted: Jun 06, 2007 2:08 pm Post subject: |
|
|
um, when i use the line above, I get this in my text file:
'CGI=HASH(0x932cbdc)->param(comment)','CGI=HASH(0x932cbdc)->param(description)','CGI=HASH(0x932cbdc)->param(email)' |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 2106 Location: UFO Lab
|
Posted: Jun 07, 2007 5:18 am Post subject: |
|
|
Oh, then this one.
| Code: | | print FILE join(',', map{q{'}.$cg->param($_).q{'}} qw(comment name emailaddress) ); |
|
|
| Back to top |
|
 |
drumcritic
Joined: 06 Apr 2007 Posts: 15
|
Posted: Jun 09, 2007 2:09 pm Post subject: |
|
|
thanks a lot!
one more thing. When I try to upload 2 files of the same name, the second file name will change from "name" to "name2" which is fine. But the first text file that is created by "name" is overwritten by the text file created by "name2". is there any way that I can fix that? |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 2106 Location: UFO Lab
|
Posted: Jun 11, 2007 5:19 am Post subject: |
|
|
Replace your line in upload.cgi:
| Code: | | open(FILE,">$c->{target_dir}/$fn.txt"); |
with
| Code: | | open(FILE,">$c->{target_dir}/$fn$i.txt"); |
|
|
| Back to top |
|
 |
drumcritic
Joined: 06 Apr 2007 Posts: 15
|
Posted: Jun 11, 2007 1:45 pm Post subject: |
|
|
| thank you sooo much! |
|
| Back to top |
|
 |
viiksi
Joined: 19 Aug 2010 Posts: 2
|
Posted: Aug 19, 2010 5:36 pm Post subject: |
|
|
I would like to get this same thing working on my Xuploader PRO.
I tried to add some of those lines you posted here but every time it just breaks it
Any way to put a bit more code visible so i see exactly where to put those lines.
Idea in this works perfectly for my purpose. |
|
| Back to top |
|
 |
|