-1

I have dynamic listing page. From that I want to delete file from server using joomla2.5. I try with the following code:

jimport('joomla.filesystem.file');
$path = JPath::clean($path);

It is not working.

Mohammed Nagoor
  • 884
  • 2
  • 12
  • 25

1 Answers1

0

To delete the folder:

JFolder::delete(JPATH_ROOT.DS.'modules'.DS.'mod_footer');

To delete the File:

JFile::delete(JPATH_ROOT.DS.'modules'.DS.'mod_footer'.DS.'mod_footer.php');
Mohammed Nagoor
  • 884
  • 2
  • 12
  • 25