|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
|||
|
|||
|
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? ) |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
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. |
|
#4
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > System Administration > FTP Help > ftp?! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|