Use PHP Script2013/05/11 |
Install PHP to use it.
|
|
[1] | Install PHP |
root@www:~#
aptitude -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 876: uncomment and add your timezone date.timezone = "Asia/Tokyo"
/etc/init.d/apache2 restart Restarting web server: apache2 ... waiting . |
[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/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> |
Sponsored Link |