PHP: Read out particular PHP settings
Question by Guest | 2016-02-24 at 10:48
I know, that it is possible to use the function phpinfo() in order to show a large list of all PHP settings available.
However, I do not need the entire list, but only some values of a few specific parameters to get some information about my configuration.
Is there any possibility to only display a specific value instead of the whole list? For example, only the values for "post_max_size", "upload_max_filesize" or another key?
Related Topics
VirtualBox: Change Date and Time
Tutorial | 10 Comments
jQuery: Read and Change Data Attribute Value
Tutorial | 0 Comments
PHP: Upload of large Files
Tutorial | 0 Comments
Rewrite Text Files with a fixed Line Length
Tutorial | 0 Comments
Send Form Input as an Array to PHP Script
Tip | 0 Comments
Determine Word Frequencies of a Text
Tutorial | 0 Comments
File Renamer: Warning - Name is already used by existing file
Question | 1 Answer
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
Yes. PHP is providing a function for this and the function is called ini_get(). You can pass your desired parameter to this function and you will get the corresponding value from your PHP configuration:
The result could be 16M, for example. If you would like to have the value in bytes, you have to multiply by 1024 in case of a K or by 10366976 in case of M.
2016-02-24 at 11:04