2011年10月26日 星期三

【php】Cannot modify header information

header 在送出之前不能有任何內容輸出,否則會出現以下error
Cannot modify header information - headers already sent by

2011年10月23日 星期日

破解網頁【鎖右鍵選單】、【禁止選取文字】

參考:http://briian.com/?p=5183

將破解的語法新增至【書籤】or【我的最愛】

【破解鎖右鍵選單】網址→

javascript:(function() { function R(a){ona = 'on'+a; if(window.addEventListener) window.addEventListener(a, function (e) { for(var n=e.originalTarget; n; n=n.parentNode) n[ona]=null; }, true); window[ona]=null; document[ona]=null; if(document.body) document.body[ona]=null; } R('contextmenu'); R('click'); R('mousedown'); R('mouseup'); })()


【破解禁止選取文字】網址→

javascript:(function() { function R(a){ona = 'on'+a; if(window.addEventListener) window.addEventListener(a, function (e) { for(var n=e.originalTarget; n; n=n.parentNode) n[ona]=null; }, true); window[ona]=null; document[ona]=null; if(document.body) document.body[ona]=null; } R('click'); R('mousedown'); R('mouseup'); R('selectstart'); })()

在需要破解的頁面中點選以上二個書籤即可破解

2011年10月12日 星期三

【CodeIgniter】移除index.php

【根目錄/.htaccess】
RewriteEngine on

RewriteCond $1 !^(index\.php|images|css|robots\.txt)
    RewriteRule ^(.*)$ index.php/$1 [L]

【application/.htaccess】
RewriteCond $1 !^(index\.php|images|css|robots\.txt)

【config/config.php】
$config['url_suffix'] = '.html';

線上製作.htaccess


參考:http://www.htaccesseditor.com/tc.shtml



功能:

  • 顯示檔案列表(Indexes)
  • Basic認證:來限制使用者存取某些頁面
  • 錯誤頁面: 400, 401, 402, 403, 404, 500 等錯誤頁面自訂
  • 預設頁面:可自訂預設頁面(預設: index.htm, index.html )
  • 設置WWW:統一將網址轉為是否包含 WWW(有利於SEO)
  • 設置轉址:設定 301 永久轉址及 302 暫時轉址
  • 存取限制:限定某些來源能否存取的路徑

2011年10月11日 星期二

【線上工具】線上產生QR Code



  • 左方填入需要條碼的網址
  • 點選【產生】按鈕
  • 右方在【下載條碼 PNG | JPG | GIF | SVG】裡選擇所需要的格式

【php】QR Code 的產生器

參考:http://www.swetake.com/qr/index-e.html



  • 下載並解壓縮後,將檔案上傳到伺服器
  • 產生器程式→qr_img.php