Simple php page at root for phpinfo()

Apologies if simplest question ever, but how do I make a simple info.php page at the root of the site so I can run things like phpinfo()? I’m talking an address like localhost.loc/info.php or production-server.com/info.php. When I try to navigate to this file now, I get my error page.

I’d say that’s a server setting. Simple alternative: Put phpinfo() in a route, make it only accessible by admins. That way, you don’t have to worry about this file which should not be publicly accessible.

1 Like