Hello,
I would like to allow uploads for different extension like "json" and "txt" files is this possible?
I've tried to add them into my local config.inc.php through pwigo code in entred:
$conf['file_ext'] = array('jpg','JPG','png','PNG','gif','GIF','mpg','zip','avi','mp3','ogg','json','txt')
but whenever i press save i get this error:
Parse error: syntax error, unexpected '}' in /var/www/vhosts/album.managemy.com/httpdocs/plugins/LocalFilesEditor/include/functions.inc.php(45) : eval()'d code on line 10
snip of code from that file:
function eval_syntax($code)
{
$code = str_replace(array('<?php', '?>'), '', $code);
if (function_exists('token_get_all'))
{
$b = 0;
foreach (token_get_all($code) as $token)
{
if ('{' == $token) ++$b;
else if ('}' == $token) --$b;
}
if ($b) return false;
else
{
ob_start();
$eval = eval('if(0){' . $code . '}');
ob_end_clean();
if ($eval === false) return false;
}
}
return '<?php' . $code . '?>';
}
please help me? how do i get this working? is there any plugins which can get this done?
Offline