开发者

kohana3.0 how to completely delete image file?

I have a kohana3.0 content and files management system, and I would like to be able to completely delete images from database, and from my folder where I have uploaded them, when a user deletes an image. Now I use for image deletion:

 public function delete($id = NULL)
{
    parent::delete($id);
    unlink($this->path);
开发者_Python百科}

this in the image model. But it doesn't actually delete my image at all.

How can an image file be deleted in kohana 3.0?


I have no idea about kohana, but the unlink() function is how files are deleted in PHP. If this isn't working, it is possible you just have a permissions problem with those files.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜