Reputation: 4299
I use ini_get('tmp_dir')
but it returns false.
I found out I can't use ini_get()
and ini_get_all()
on server.
Why can I not use it?
Upvotes: 1
Views: 337
Reputation: 449613
Most likely, as others already say, the hosting provider is blocking scripts from calling the ini_get()
function for security reasons.
In this case, however, I would not use the system's temporary directory at all. Chances are that your script can't write or read there either, also for security reasons.
If you need to create temporary files, best use a directory inside your user directory (but outside the web root).
Upvotes: 1
Reputation: 1364
It can be disabled by disable_functions
directive, which is quite usually the case on virtual hosting services for security reasons.
Upvotes: 0
Reputation: 93177
It might be a limitation of your hosting service. You should try to contact them.
Upvotes: 1
Reputation: 125574
use this function:
Returns the path of the directory PHP stores temporary files in by default
Upvotes: 0