I host my site on a shared hosting, which lately changed the server to safe mode (without even notifying that). I use a feature that download files from the server, using the readfile() function (I use php). Now, in safe_mode, this function is no longer available. Is there a replacement or a workaround to handle the situation that the file will be able to be downloaded by the user?
Thanks
As I wrote in comments,
readfile()
is disabled by including it indisable_functions
php.ini directive. It has nothing to do with safe mode. Try checking which functions are disabled and see if you can use any other filesystem function(-s) to do whatreadfile()
does.To see the list of disabled functions, use:
You might use: