Bug #10835: File Upload

From: Date: Sat, 12 May 2001 23:19:42 +0000
Subject: Bug #10835: File Upload
Groups: php.dev 
Request: Send a blank email to php-dev+get-55046@lists.php.net to get a copy of this message
From: fergiboy@home.com Operating system: Windows 2k Server PHP version: 4.0.5 PHP Bug Type: FTP related Bug description: File Upload I created an upload script that will upload to my ftp server, the variable $file comes from a different file: $a = stripslashes ($file); $b = basename ($a); $ftp_server = "ftp_server"; $ftp_user_name = "user"; $ftp_user_pass = "password"; $dir = "ftp"; $conn_id = ftp_connect("$ftp_server"); $login_result = ftp_login($conn_id, "$ftp_user_name", "$ftp_user_pass"); $cd = ftp_chdir ($conn_id, $dir); $upload = ftp_put($conn_id, $b, $a, FTP_BINARY); if (!$upload) { echo "<b>Ftp upload has failed!</b><br>"; } else { echo "Uploaded<br>"; } $discon = ftp_quit($conn_id); echo "<i>$b</i>"; This script will work most of the time, but when the file to be uploaded is located in certain folders the file will not upload. I made one change to the php.ini file to allow uploads greater than 2 megs. -- Edit Bug report at: http://bugs.php.net/?id=10835&edit=1

« previous php.dev (#55046) next »