desithugg Posted October 7, 2006 Share Posted October 7, 2006 im having problem with this script[code]<?$file1 = $_GET['file'];if($file1 == ""){echo"You did not select which file to delete.";exit;}$file = "/files/new/$file1"; ?><?php$ftp_server = "ftp://desithugg.de.funpic.org/";$conn_id = ftp_connect($ftp_server);// login with username and password$login_result = ftp_login($conn_id, "desithugg", "password");// try to delete $fileif (ftp_delete($conn_id, $file)) { echo "$file deleted successful\n";} else { echo "could not delete $file\n";}// close the connectionftp_close($conn_id);echo"file deleted";?> [/code]i keep getting the fallowing error[quote]Fatal error: Call to undefined function: ftp_connect() in /usr/export/www/hosting/desithugg/deletefile.php on line 2[b]$ftp_server = "ftp://desithugg.de.funpic.org/"; is line2[/b][/quote]im not sure what to put as the server any ideas Link to comment https://forums.phpfreaks.com/topic/23276-ftp-delete-problem/ Share on other sites More sharing options...
Orio Posted October 7, 2006 Share Posted October 7, 2006 From the manual:[quote]resource ftp_connect ( string host [, int port [, int timeout]] )hostThe FTP server address. This parameter shouldn't have any trailing slashes and [b]shouldn't be prefixed with ftp://[/b].[/quote]Try removing the "ftp://" prefix.Orio. Link to comment https://forums.phpfreaks.com/topic/23276-ftp-delete-problem/#findComment-105526 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.