I am working on a plugin that exports article metadata to json files. Part of the code is using fopen
function but it fails on some installations with permission denied errors because it attempts to crate the file in the plugin’s folder.
`
$json_file = fopen("submission_{$submission_id}.json", "w") or die("Unable to open file!");
fwrite($json_file, $json_file_contents);
fclose($json_file);
`
I am currently searching through the code on how to read the files_dir
setting from conf.inc.php file and have not been lucky so far. I will appreciate any help. Thanks