Hi,
I am building an application in flash that speaks to a database using PHP. I
know you can remove rows from a database in PHP using a DELETE in the SQL
statement. Does anyone know how to delete a file like a jpeg?, I would press a
button in flash it would then call some PHP script, does anyone know the PHP to
remove a file?
thanks
Gavin
MotionMaker - 27 Mar 2007 12:44 GMT
The permissions need to be set on the file or folder to allow PHP to delete
$fileDeleted = unlink("/home/user/public_html/file.jpg");
// fileDeleted = 1 means success for the Flash side confirmation