ik heb een upload scriptje gemaakt voor me site om foto's ge gaan upteloaden. Nu wil het alleen niet werken 
ik krijg dit: Fatal error: Call to undefined function: ftp_connect() in /freewor/public_html/upload.php on line 13
Dit is me scriptje:
ik krijg dit: Fatal error: Call to undefined function: ftp_connect() in /freewor/public_html/upload.php on line 13
Dit is me scriptje:
PHP:
1
| <?if($submit) { //ftp gegevens $ftp_server = "xxxxx"; $ftp_user_name = "xxxxxx"; $ftp_user_pass = "xxxxx"; $source_file = "$source"; $temp_source = basename($source); $destination_file = "upload/$temp_source"; // set up basic connection $conn_id = ftp_connect($ftp_server); // login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); // check connection if ((!$conn_id) || (!$login_result)) { echo "Ftp connection has failed!"; echo "Attempted to connect to $ftp_server for user $ftp_user_name"; die; } else { echo "Connected to $ftp_server, for user $ftp_user_name<br>"; } // upload the file $upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY); // check upload status if (!$upload) { echo "Ftp upload has failed!"; } else { echo "Uploaded $source_file to $ftp_server as $destination_file"; } $file = fopen ("$ftp_server/$destination_file", "r");// bestaat de download link wel? zo nee geef dan offline weer if ($file) { echo "Je kunt het bestand nu vinden onder http://$ftp_server/$destination_file"; }}else{?><form enctype="multipart/form-data" action="<? echo $PHP_SELF; ?>" method=post>De te uploaden file: <input name="userfile" type="file"><br><input type="submit" value="Upload file" name="submit"></form><?}?> |