Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

[CLOSED] "deleteFile" function in FILE.PHP doesn't work 26 Jun 2012 13:06 #2682

the function doesn't work. it doesn't delete the files.

Please Log in or Create an account to join the conversation.

Last edit: by admin.

Re: "deleteFile" function in FILE.PHP doesn't work 26 Jun 2012 13:14 #2683

I found out. it's due to the filepath parsing.

Please Log in or Create an account to join the conversation.

Re: "deleteFile" function in FILE.PHP doesn't work 26 Jun 2012 15:02 #2684

the problem is not even that.
it seems there is some kind of conflict in the JFile/JCOOKFile class.
even using the unlink() function directly with the file (but using it inside the class) the file will not be deleted.

if I use the unlink() function directly in the jmodel.item.php (bypassing the switch "delete, trash, thumbs") it perfectly works.
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

Re: "deleteFile" function in FILE.PHP doesn't work 25 Jul 2012 18:43 #2889

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
I had a look, and I can't find the issue.
It is working for me.

If you want to delete the file, you must select 'delete'

When choosing 'remove (unlink)', it only erase the link of the image, and leave the file. This is the normal behavior.
Is it correct for you or do you have an issue using 'Delete' ?
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: "deleteFile" function in FILE.PHP doesn't work 25 Jul 2012 18:53 #2890

I don't remember now, I have to take a look again on the code where it didn't work.I'll do on the next days I guess.
by the way, I'm talking about the php unlink() function.

Please Log in or Create an account to join the conversation.

Re: "deleteFile" function in FILE.PHP doesn't work 25 Jul 2012 19:46 #2891

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Are you running under Windows, Mac OSX, or Unix ?

The component do not call unlink php function.
It uses the Jooma Framework, through JFile Class.

... but it is the same.

Tell me when you have more informations.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.139 seconds

  I found "cook" two days ago. Played around with it for a day and then within a day got rid of two legacy applications in IBM Lotus Domino Notes and replaced them with "cook". It was really easy. A piece of cake. Actually it was even easier than cooking. Cooking involves more work than developing with "cook". What can I say about "cook"? Great application great price for what it delivers great forum with a lot of information and fast responses active and friendly community fast forward moving development cycle So what should I say "Monsieur Le Cook"? Keep the good work going it will lead to success. Having become a paying member in the words of Edith Piaf may I say ..... non rien de rien ... je ne regrette rien. Vive La France.
FK (JED)
         

Get Started