$key = "This is supposed to be a secret key !!!"; function keyED($txt,$encrypt_key) { $encrypt_key = md5($encrypt_key); $ctr=0; $tmp = ""; for ($i=0;$i{ if ($ctr==strlen($encrypt_key)) $ctr=0; $tmp.= substr($txt,$i,1) ^
example.php複製代碼 代碼如下:$conn = ociplogon("test","123456","test123"); include_once "pager.inc.php"; ?>複製代碼 代碼如下:/** 分頁測試開始 */ // {{{ 初始分頁對象 $pager = new pager(); /** 將 select id,name,age from test where age>20 order by id desc 拆分 */ $sqlArr =
# -------------------------------------------------------- # 資料表的結構 'menu' # --------------------------------------------------------CREATE TABLE menu ( menu_id int(11) NOT NULL auto_increment, menu varchar(20) NOT NULL, menu_grade int(11) NOT NULL,
來源:www.freelamp.com LAMP 架構的網站,我以前注重的多是安裝/配置方面的,講述開發的相對較少,因為自己從事開發也少。本文的原文當然也來自: Published on The O'Reilly Network (http://www.oreillynet.com/) http://www.oreillynet.com/pub/a/onlamp/2002/04/04/webdb.html 看了以後,頗有啟發,以前開發中遇到的一些問題,迎刃而解。所以翻譯出來和大家共用。 1.
if(!$whichpage) { $notepage=1; } else { $notepage=$whichpage; } $noterecs=0; $pagesize=10; $bbsconn=mysql_connect("localhost","root"); mysql_select_db("rainwindy",$bbsconn); $bbsresult=mysql_query("select * from bbs order by id desc",$bbsconn);
一個簡單的自動發送郵件系統 php的另一個強大的特徵就是他有能通過html的表單修改變數的能力,通過這些變數,我們可以實現很多任務,包括象:發送wed-based的郵件,把資訊輸出給螢幕,從資料庫中讀取和傳遞資料。下面讓我們構建一個小型的自動發送郵件系統,來示範這個能力。 讓我們假設有這樣一個html的表單: -------------------------------------- Request for more information Would you like
如下: /****************************************************************************** Description: This is a simple script to send emails via a html-form to different users Date : 1999-02-25 Author : amalesh kempf