To extend the core functionality of PHP you can install some additional extensions. PHP extensions are available as packages and can be easily installed with:
sudo apt install php-[extname]
For example if you want to install MySQL and GD PHP extensions you would run the following command:
sudo apt install php-mysql php-gd
After installing a new PHP extension do not forget to restart the Apache or the PHP FPM service, depending on your setup.
Testing PHP Processing
To test whether your web server is configured properly for PHP processing, create a new file called info.php inside the /var/www/html
directory with the following code:
<?php
phpinfo();
Save the file, open your browser of choice and visit http://your_server_ip/info.php
0 komentar:
Posting Komentar