Ubuntu 15.04
Sponsored Link

Use PHP Scripts2015/05/25

 
Install PHP to use PHP Scripts.
[1] Install PHP.
root@www:~#
apt-get -y install php5 php5-cgi libapache2-mod-php5 php5-common php-pear
root@www:~#
vi /etc/apache2/mods-enabled/mime.conf
# near line 220: add extension for PHP

AddHandler php5-script .php
root@www:~#
vi /etc/php5/apache2/php.ini
# line 884: uncomment and add your timezone

date.timezone =
"Asia/Tokyo"
root@www:~#
systemctl restart apache2

[2] Create a PHP test page and access to it with web browser. It's OK if following page is shown.
root@www:~#
vi /var/www/html/index.php
<html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align:center;">
<?php
      print Date("Y/m/d");
?>
</div>
</body>
</html>
Matched Content