Hi there.
Im using the latest version of Chronoforms, thanks for creating this great plugin.
I searched the forum for solutions to my issue, but every solution i tryed didnt solve my problem.
I'm searching for the peace of php code to put in the event to delete the files uploaded after they are send to the email adress given.
Hope somebody could help me out.
T
Hi fection ,
Which solutions didn't work for you?
Bob
<?php
$ruta = '/path/to/the/folder/*';
$arxiu = glob($ruta);
array_map('unlink', $arxiu);
?>
replaced path for my path.....but didnt work
Errror:
Language string failed to load: invalid_address: qweqwe
Warning: array_map() [function.array-map]: Argument #2 should be an array in /home/tvscreen/domains/xxxxxxxxx.com/public_html/administrator/components/com_chronoforms/form_actions/custom_code/custom_code.php(18) : eval()'d code on line 5
Thank you for sending in your arrival form!
Dear Greyhead.
Have you had the time to check out my problem?
Greets
Fection
Hi Fection,
It looks to me as though the code is working OK but the path goes to an empty folder. Please check that you have the complete path there.
Bob
Thank you Greyhead.
Can i use this one? : JOOMLA_PATH/components/com_chronoforms/uploads/FORM_NAME/
Or do you suggest using the core path
I tryed , and now the this error comes up:
Warning: unlink(components/com_chronoforms/uploads/Arrival/) [function.unlink]: Is a directory in /home/tvscreen/domains/mywebsiteadress.nl/public_html/administrator/components/com_chronoforms/form_actions/custom_code/custom_code.php(18) : eval()'d code on line 5
I know you probably very busy but i hope you find the problem .... im stuck at the moment and cant continue with my project.
Hi fection,
That isn't an 'Error' it's a PHP 'Warning' (that something *might* be wrong). Do the files get deleted?
Bob
No, al the files al still there .
Hi fection,
I tried Googling 'Warning: unlink' and the most common answer seems to be that the Joomla! User (or the FTP User if FTP is enabled for your site) doesn't have delete permission for this folder.
Bob
But i chmodded the folder the right way.
And ftp is enabled, it CAN delete components and modules folders on uninstall.
So it should have the right permission right?
Hi fection,
It *should* indeed. But it's not able to delete your files so maybe it hasn't ???
Bob
Worked like a charm! So for people with the same problem, just add "*" after your form folder name!
Thank you Greyhead and fredrik!
Fection