FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsSystem AdministrationFTP Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 23rd, 2000, 02:16 AM
wangjun
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I want to fopen a local file with php program in server.
The file name is transferred through a form
...< input type="file" name="filename"...
I write the php code like this
fopen($filename,"r");
But I cant reach to my expected result.

So I should use ftp? first, ftp the file form local disk to server, then in server fopen the file. ...
( and can i implement it? )

Reply With Quote
  #2  
Old July 24th, 2000, 06:13 AM
lhallusa lhallusa is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 43 lhallusa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
Send a message via ICQ to lhallusa
To debug it put some print statements in place:

print("File Path: $filename<br>n");
print("File Name: $filename_name<br>n");
print("File Type: $filename_type<br>n");
print("File Size: $filename_size<br>");

That way you know if the file is being uploaded properly. There's other things I don't know if your doing. Put hidden input type called MAX_FILE_SIZE
<input type="hidden" name="MAX_FILE_SIZE" value="2048000"> for 2 meg max. Don't go over 2 meg.
before the <input "file" ....
Also in the form statement do you have ENCTYPE="multipart/form-data" and POST only not GET.
If your doing all this it should work.



Reply With Quote
  #3  
Old July 24th, 2000, 07:24 AM
wangjun
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Thank u lhallusa.
I'm a new man of PHP.
So an detailed demo(including some source code) would be important for me.

ftp functions must be used in PHP4, right?
Can u tell me how to setup ftp lib in RedHat + Apache.

Reply With Quote
  #4  
Old July 24th, 2000, 06:48 PM
lhallusa lhallusa is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 43 lhallusa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
Send a message via ICQ to lhallusa
Why does it give an error "Fatal error: Call to unsupported or undefined function ftp_connect()"?
You failed to compile PHP with the FTP functions. You need PHP 3.0.13 or higher, and you must configure it with the --with-ftp flag. Go to the PHP web site for help with that.

Found this at: http://www.inebria.com/phpftp/

hope that helps. The source code is there also which has PHP ftp functions using the phpftp extension.


------------------
lhallusa
webpatron.com

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > ftp?!

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap