Checking the PHP information of your website can help you understand the PHP version, configuration settings, and installed modules. Here’s how to do it:

Method 1: Using a phpinfo.php File

  1. Create a phpinfo.php File:
    • Open a text editor (like Notepad or TextEdit) and create a new file.
  2. Add the PHP Code:

Insert the following code into the file:
php
Copy code
<?php phpinfo(); ?>

  1. Save the File:
    • Save the file as phpinfo.php.
  2. Upload the File to Your Server:
    • Use an FTP client or cPanel’s File Manager to upload the phpinfo.php file to the root directory of your website (usually public_html).
  3. Access the File in Your Browser:

Open your web browser and navigate to:
arduino
Copy code
https://yourdomain.com/phpinfo.php

  • Replace yourdomain.com with your actual domain name.
  1. View the PHP Information:
    • A page will load displaying detailed information about your PHP installation, including the version, configuration settings, and loaded modules.
  2. Delete the File (Important):
    • After checking your PHP information, delete the phpinfo.php file from your server for security reasons.

Method 2: Using cPanel

  1. Log in to cPanel:
    • Navigate to your cPanel URL (e.g., https://yourdomain.com/cpanel) and log in.
  2. Locate the Software Section:
    • Scroll down to the "Software" section.
  3. Click on MultiPHP INI Editor:
    • Select "MultiPHP INI Editor". This will show basic PHP configuration details, including the current version.
  4. View PHP Configuration:
    • You can view and edit PHP settings here, though it may not provide as detailed information as the phpinfo() function.

Conclusion

Checking your website's PHP information is straightforward and can be done easily with a simple script or through cPanel. Always remember to remove any sensitive files like phpinfo.php after use to maintain security on your server!

Дали Ви помогна овој одговор? 0 Корисниците го најдоа ова како корисно (0 Гласови)