![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Apr 2003
Location: On the edge
Posts: 1,796
|
I need a small cgi tweak - txt importing
Basically I have a script that allows me to import data pasting it directly into the browser window or uploading a file thru the browser.
Problem is files are too big and the browser times out. So I would like to upload the file via ftp and make the script read the file directly from the server. How can I add an else option that checks if a file located at /path/new.txt exists ? The code I am using right now is like this: if(SCRIPT::App::Guts::strip($q->param("new_data")) ne ""){ $new_data= $q->param("new_data"); }else{ if($data_file){ my $new_file = file_upload('new_data_file'); open(UPLOADED, "$new_file") or die $!; { local $/ = undef; $new_data= <UPLOADED>; } close(UPLOADED); unlink($new_file) or warn "could not remove uploaded data, '$new_file': $!"; } } Thanks ![]()
__________________
ICQ :333-548-380 |
![]() |
![]() ![]() ![]() ![]() ![]() |