瀏覽模式: 普通 | 列表

Redirect 重導網頁

php 方式 - 2008/01/23

<?php
header("Location: http://ssorc.tw");
?>

除了使用 index.html 的方式,可在 apache 的 conf 檔裡動手腳 - 2007/12/28
   vi /etc/httpd/conf/httpd.conf

LoadModule proxy_module modules/mod_proxy.so
<VirtualHost *:80>
    ServerAdmin cross@ssorc.tw
    ServerName proxy.ssorc.tw
    ErrorLog logs/proxy.ssorc.tw-error_log
    CustomLog logs/proxy.ssorc.tw-access_log combined
    CustomLog logs/proxy.ssorc.tw-deflate_log deflate
    ProxyRequests Off
    ProxyPass / http://1.1.1.1:123
    ProxyPassReverse / http://1.1.1.1:123
</VirtualHost>

   如此當連 proxy.ssorc.tw 就會導到 http://1.1.1.1:123

把某些檔案重導至某個地方 - 2007/11/02

[閱讀全文]

Quote: http://twpug.net/modules/smartfaq/faq.php?faqid=31
1. 引用了UTF-8格式的文件

有些UTF-8格式的文件會在文件的開始放入判斷字元(BOM),可以啟用PHP.INI的設定
output_buffering = 4096

或是採用類似SMARTY樣版的方式來避免類似問題發生

2. 手誤

像是少了一個引號、多按了一個空白之類的,所以經常看的到...
標籤: php

Firefox外掛Yahoo!字典

簡單好用的 Flash相簿軟體 - SimpleViewer


下載管理介面 SimpleViewerAdmin

    http://www.redsplash.de/projects/simplevieweradmin/#Download

        http://www.redsplash.de/pub/SimpleViewerAdmin-1.3.zip 

下載 SimpleViewer

    http://www.airtightinteractive.com/simpleviewer/

        http://www.airtightinteractive.com/simpleviewer/simpleviewer.zip

將檔案解在同一目錄裡

    /var/www/html/simpleviewer/

    chown -R apache /var/www/html/simpleviewer/ 

瀏覽

    http://ssorc.tw/simpleviewer/index.php

預設帳號/密碼

    admin/admin

登入後修改 Configuration -> Save

點選 Albums (+) 新增相簿

    在 Add image選擇要上傳的圖片

[閱讀全文]

Apache 模組 mod_ssl -- 讓網站的連線過程加密

CentOS4.4 Final

安裝 httpd 與 mod_ssl 套件

設定 SSL 的地方
   /etc/httpd/conf.d/ssl.conf

放 key 的地方,套件就已附 key 了
   /etc/httpd/conf/ssl.*           

非 SSL
   echo "no SSL" > /var/www/html/index.html
   vi /etc/httpd/conf/httpd.conf
<VirtualHost *:80>
    DocumentRoot /var/www/html
    ServerName nossl.ssorc.tw
    ErrorLog logs/nossl.ssorc.tw-error_log
    CustomLog logs/nossl.ssorc.tw-access_log common
</VirtualHost>

建立要作 SSL 的目錄
   mkdir /var/www/html/ssl
   echo "SSL" > /var/www/html/ssl/index.html

[閱讀全文]

標籤: apache ssl 加密

自行編譯 php4

1.

apt-get install flex httpd-devel

 

2.
tar zxvf php-4.4.1.tar.gz
cd php-4.4.1
 

3.

./configure --with-apxs2=/usr/sbin/apxs --with-mysql --with-gd --with-zlib-dir --with-jpeg-dir --with-png-dir
make
make install

 

註:

'--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d'
 

4.
cp php.ini-dist /usr/local/lib/php.ini
 

[閱讀全文]

標籤: apache php php4