Category Archives: apache

Apache 2.4升級筆記

根據http://jasonpowell42.wordpress.com/2013/04/05/install-apache-2-4-4-on-centos-6-4/ ,但是安裝時要注意configure cd /usr/src/   wget http://ftp.tc.edu.tw/pub/Apache//httpd/httpd-2.4.9.tar.gz   tar xzvf httpd-2.4.9.tar.gz   cd httpd-2.4.9   ./configure –enable-so –enable-ssl –with-mpm=prefork –with-included-apr –mandir=/usr/share/man –sysconfdir=/etc/httpd   make; make install   cd /etc/httpd   rm httpd.conf   ln -s conf/httpd.conf httpd.conf   yum -y … Continue reading

Posted in apache, Linux | Leave a comment

[PHP] 將_GET與 _POST陣列的變數,轉為全域變數的兩種作法

因為最近要改別人寫的舊專案,該專案的寫法為需要將_GET與_POST陣列的變數,改為全域變數。也就是說,我們可以用$register 直接存取$_GET[‘register’]; 像這類的要求,可以分為兩種解決方法: 1. 如果管理員有給.htaccess操作的權限:那麼,可以在.htaccess加入以下語法: php_value register_globals Onphp_flag register_globals On 2. 如果管理員沒有給.htaccess操作的權限: 我從這篇得到的方法,只要寫一個set_globals.php的程式,程式碼內容如下: 每當有程式要執行時,先加一句 require(‘set_globals.php’); 或include(‘set_globals.php’); 引入該檔案即可。 參考資料[程式][PHP] 如何快速接收POST或是GET的變數,並轉存。

Posted in apache, PHP, 網頁撰寫 | Leave a comment

[Apache] htaccess 入門/進階 教學資源

.htaccess是什麼?.htaccess幾個簡單應用 Apache .htaccess Guide & Tutorial Apache Tutorial:.htaccess file .htaccess Tutorial THE Ultimate Htaccess Advanced htaccess tutorial more .htaccess tips and tricks 8 Great Htaccess Rules To Improve Your Website 用 htaccess 來擋圖片盜連並且讓 google reader 可讀 Ultimate Guide to htaccess … Continue reading

Posted in apache, Linux, PHP, 網頁撰寫, 資訊安全 | Leave a comment