|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-03-26 18:16 UTC] kalle@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 23:00:01 2025 UTC |
Description: ------------ the error is: 1). ftp_put() expects parameter 1 to be resource, string given in D:\xampp\htdocs\ftp\testftp.php on line 10 2). ftp_close() expects parameter 1 to be resource, string given in D:\xampp\htdocs\ftp\testftp.php on line 15 Reproduce code: --------------- --- From manual page: faq --- <?php //error_reporting(0); $conn_id="ftp.vidhyalokam.com"; $destination_file="/public_html/test/"; $source_file="NEWS"; // ftp_pasv( $ftp, 1); $upload= ftp_put($conn_id,$destination_file,$source_file,FTP_ASCII); if (!$upload) {echo"sorry, didn't work.";} else {echo"OK!";} ftp_close($conn_id); ?> Expected result: ---------------- Expecting that all the files of Directory "NEWS" upload to server in "/public_html/test/"