Forum Moderators: coopster

Message Too Old, No Replies

Upload image success... Now how to delete?

         

AlexLee

3:28 pm on Feb 15, 2005 (gmt 0)

10+ Year Member



I had used the PHP code to upload an image into the web server. How do I delete them without using FTP. But only using PHP?

hakre

3:42 pm on Feb 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



use the unlink() function [php.net].

AlexLee

1:51 pm on Feb 24, 2005 (gmt 0)

10+ Year Member



Can me give me a code example?
I learn faster when I can analyse action working codes.

jatar_k

6:29 pm on Feb 24, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



pretty straight up

$filename = '/path/to/my/file.php';
unlink($filename);

the php.net site would help
[php.net...]