Pages

Thursday, 2 January 2014

在linux vps上搭建基于php的静态博客程序:houtje-touwtje(有点简陋)


cd /var/www/
git clone https://github.com/atelierbram/houtje-touwtje
cd houtje-touwtje

as3:/var/www/houtje-touwtje# cd php
as3:/var/www/houtje-touwtje/php# ls
about  contact  inc  index.php  io.sh  lab
as3:/var/www/houtje-touwtje/php# chmod 755 io.sh
as3:/var/www/houtje-touwtje/php# nano io.sh
as3:/var/www/houtje-touwtje/php# cat io.sh
#!/bin/bash

# write to file
write_to_file()
{

 curl "http://localhost/houtje-touwtje/php/index.php" > "../index.html"
 curl "http://localhost/houtje-touwtje/php/lab/index.php" > "../lab/index.html"
 curl "http://localhost/houtje-touwtje/php/about/index.php" > "../about/index.html"
 curl "http://localhost/houtje-touwtje/php/contact/index.php" > "../contact/index.html"
 }

# execute it
write_to_file

as3:/var/www/houtje-touwtje/php# nano inc/config.php
(把rootUrl的值改为http://as3.brite.biz/houtje-touwtje/)
as3:/var/www/houtje-touwtje/php# ./io.sh




演示站点:http://as3.brite.biz/houtje-touwtje/
项目地址:https://github.com/atelierbram/houtje-touwtje