Mkdir outside the plugin folder when upload is finished
-
Hi,
I am using the file uploader for a web server. So when a new file is uploaded via the plugin, I want to recognize this and automatically do some stuff like generating a folder somewhere outside the plugin folder where future results are stored.
So my idea was now to easily adjust the
wfu_io.php
script to also generate the folder for me. So what I did was adding some code to the
wfu_create_directory
function like this:
mkdir($path, 0777, true);
// my new code
mkdir(“/root/results/foo”, 0777, true);Anyway, the new ‘foo’ folder is not generated and I don’t know why? When I modify something like this:
mkdir($path . “/foo”, 0777, true);
then the ‘foo’ folder is generated within
‘wp-content/uploads/foo’
Is there maybe a problem by generating folders outside the plugin folder? Can I anyway do this somehow?
Thank you very much!
Martin
- The topic ‘Mkdir outside the plugin folder when upload is finished’ is closed to new replies.