A phpinfo file also offers a description of many other important settings, which you can use to analyze what might be causing any possible conflicts with your web server. Be sure that no matter what platform you are on, you use a text based editor not a word processor and save the text file as an ascii text document a regular text file. Your web hosting control panel may also provide a text editor.
In your text editor, start a new text document. Highlight, copy and paste or type the following code into this document:. Whenever the phpinfo function is called without any argument then it will all the information about the PHP configuration in the system, some of the information includes:. Now save the file and run it using the PHP server installed in your system. You will get the information displayed like in the image given below:. Other than all the information what if you want specific information like info about variables only or license only.
You can do that you just have to pass an argument in the function either as name or their specific value. Every information has given a particular keyword and a value associated with it which we can use in the PHPINFO function to get only selective information.
However, some parameters highlight specific information. These parameters include :. One of the simplest methods to use the phpinfo function is by creating a phpinfo page. Later on in this post, we will discuss how you can create a phpinfo page. However, if you want specific information, use the above functions to check details without a hitch. After using this feature, you can find the following data. But, instead of individually checking this information one by one, use the phpinfo function to find all details at once.
Creating a phpinfo File is a kind of very simple procedure. You must have File Manage access or FTP access of the server on which you would like to run the test. Open Notepad application notepad. Should you need too, you can use the above-mentioned parameters in parentheses to find individual information. Once you open the page, locating and checking specific details become easier. As we already mentioned, once you create and place phpinfo.
An unfortunate result of this is that a malicious hacker can access the information and use it to infiltrate security. After reading and trying various functions, I couldn't find one that correctly parses all the configurations, strips any left-over html tag and converts special characters into UTF8 e.
A simple method to style your own phpinfo output. This is a slight modification to the previous code by "code at adspeed dot com" that extracts the PHP modules as an array. I used it on PHP 4. Otherwise, nice script. This function parses the phpinfo output to get details about a PHP module.
Now we have a really flexible addition to phpinfo ;. One note on the above functions for cleaning up the phpinfo HTML and throwing it into an array data structure.
0コメント