Related Content
PHP:CSI - To Switch, Or Not To Switch?
I was writing unit tests for a API mapping function recently and came across this interesting issue. The code I was writing tests for was in a legacy codebase that I was making changes to, and it made sense to have some unit tests in there before I started work to ensure everything worked before and after.
Drupal 9: Generating Header Images For Pages Of Content Using PHP
Embedding image within pages of content helps both within the design of the page and when shared on social media. If you set up meta tags to point at a particular image then that image will appear when the page is shared on social media. This makes your page stand out more.
Using PSR-4 With Composer
The PHP Standards Recommendations (called PSR) are a set of standards that aim to make certain aspects of working with PHP easier.
Generating A PDF From A Web Page Using PHP And Chrome
Generating a PDF document from a web page through PHP can be problematic. It's often something that seems quite simple, but actually generating the document can be difficult and time consuming.
PHP:CSI - Date Is Less Than One Month Ago
Working with logic surrounding dates can sometimes be difficult and it's fairly common to come across really subtle date and time based bugs.
I was recently shown a bug in a PHP application that looks like it should be working at face value, but doesn't actually produce the correct result.
An Introduction To Object Reflection In PHP
Reflection is used to gather more information about code during the runtime of the program. This allows code to inspect itself and to make small modifications, which is useful in a variety of situations.
Comments
Submitted by Lem on Thu, 08/27/2015 - 02:25
Permalinkphp --info
That doesn't have any HTML in it :)Submitted by philipnorton42 on Thu, 08/27/2015 - 11:48
PermalinkI know this is really old... but for us old timers that are just beginning this php journey, how/where do you run a script like this?
Thanks.
GOJ
Submitted by GoodOlJoe on Tue, 01/31/2023 - 04:24
PermalinkHi GoodOlJoe, thanks for commenting.
You can run this script in two ways.
1) On the command line.
Assuming you have PHP installed, create a file called something like phpinfo.php. Then, open up a terminal prompt, change directory to the same directory that the file is located, and run it like this.
You will find that once it's run you'll have another file in the same directory called phpinfo.html.
2) Via a web server
This is slightly more tricky if you're new to PHP, but there are plenty of tutorials out there on installing PHP and a web server (Apache and Nginx are the main two).
Once you have it installed you need to put the script into the web directory in the form of a file called something like phpinfo.php. All you need to do then is visit the file through your web browser. This might have the following address
Both of these do depend on how you set things up though. In the world of docker containers there are numbers ways in which you can stand up a local web server and run both of these actions.
Good luck!
Submitted by philipnorton42 on Tue, 01/31/2023 - 08:05
PermalinkAdd new comment