|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problems with ftp_delete
I try to delete a file on a server. I´ve tried it with this code but its not working.
// get the directory $file= chdir("../dateien/".$projekt."/".$bereich."/".$unterbereich); $delete = ftp_delete($conn_id,$datei); Could anyone help me out? Thanks 7dirk |
|
#2
|
|||
|
|||
|
where the $datei 's come from ?
|
|
#3
|
|||
|
|||
|
it coming from a form. It´s defined with something like data.swf
|
|
#4
|
|||
|
|||
|
So, what you're trying to show with the $file variable ?
|
|
#5
|
|||
|
|||
|
the directory where the file is hanging around
|
|
#6
|
|||
|
|||
|
I know.... but what I mean is:
ftp_delete ( resource ftp_stream, string path) So, you need to replace the "string path" above with your file path (which is $datei, right ?) Remember, not only the file name, but the path. So if it come from a form, it should be /var/www/html/files/data.swf instead of data.swf Look at this example: if this script named delete.php, and the structure of folder is index.php delete.php other.php datafile/data.swf just use /// delete.php /// PHP Code:
|
![]() |
| Viewing: Dev Shed Forums > System Administration > FTP Help > Problems with ftp_delete |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|