Your model name "File" might be stepping on the toes of the "File" helper, but it has many of the functions you would probably want to use.
http://api.cakephp.org/class_file.html The delete() function in there is what you are looking for, but check out the other functions as well as they will probably be useful for other things you are trying to do with your files. On May 8, 9:17 am, Enchy <[EMAIL PROTECTED]> wrote: > Hi > > I have made a table called files. its for a uploader . > You upload the files and details about the files get stored in > database. > > The name of file gets stored in column "name" in files table > The files are stored in a directory called files > > I would like to know what I add to this function to delete the file. > Is there a built in function in cakephp for this or should I just use > unlink? > > function delete($id) > { > $this->File->del($id); > $this->redirect("/docs.php?PageID=$pageid"); > > } > > Thanks > L --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
