The plugin uses plugins_url (i.e it tries to download the file over HTTP, instead of opening the actual file on disc). This pretty much renders the plugin useless if you have strict PHP settings (i.e can’t download files over http via file()).
Following code uses the local file, instead of remote:
$file = ‘mime-types.txt’;
$file = plugin_dir_path(__FILE__) . $file;
$mime_file_lines = file($file);
- The topic ‘Plugin uses plugins_url, should be plugin_dir_path?’ is closed to new replies.