I am creating a plugin in WordPress Version 3.4.2. When the administrator submits a form, a new folder is created inside my plugin directory and a file saved in this new folder.
But it gives me the following error:
error : The file has not been created $dir = plugins_url()."/folder-name/;
The above code returns the following path:
http://localhost/website/wp-content/plugins/abc/folder-name mkdir($dir, 0777, true);