Time of Update: 2016-07-29
其他雜項 13.1 產生映像 PHP可以操作處理映像。如果你已經安裝了GD庫,你甚至可以利用PHP產生映像。 Header("Content-type: image/gif"); $string=implode($argv," "); $im = imagecreatefromgif("images/button1.gif"); $orange = ImageColorAllocate($im, 220, 210, 60); $px = (imagesx($im)-7.5*strlen($
Time of Update: 2016-07-29
找了很久,終於給我找到!哈哈哈... //聽說php4也已經支援Java/EJB的說. // this script is come from zend. :) $word = new COM("word.application") or die("Unable to instanciate Word "); print "Loaded Word, version {$word->Version}n"; $word->Visible = 1;
Time of Update: 2016-07-29
4.據庫串連
Time of Update: 2016-07-29
//樹型目錄結構模板程式 //菜單目錄庫欄位說明: //menu_id 功能表項目 id //menu 菜單名稱 //menu_grade 菜單等級 1 為主菜單 2 為二級菜單 ........ //menu_superior 上一級菜單 id 號 function my_menu($menu_content,$i,$menu_grade_temp,$menu_superior_temp) { global
Time of Update: 2016-07-29
//檔案上傳。Linux+apache+php3/4測試通過。iis測試未通過,win+apache+php未測試 if ($HTTP_POST_VARS["upload"]=="上傳"){ file://這裡你可以加上檢查檔案名稱,格式,圖片尺寸等功能, file://$picurl 本地系統的全路徑 file://$picurl_name 上傳後的臨時檔案名稱 file://$picurl_size 檔案的大小(位元組) file://$picurl_type
Time of Update: 2016-07-29
1.upfile.php檔案 檔案上傳 2.upload.php //取得當前日期資訊,並串連成為一個字串 $datetime = getdate(); $time = implode("",$datetime); //構造檔案名稱 //$filename="uploadfiles/".$time." ".$upfile_name; $filename="uploadfiles/".$upfile_name; //將檔案實際的存放在伺服器上 $copymes =
Time of Update: 2016-07-29
$memo_file="phpcount/vst.txt"; if ($phpxcount<>$REMOTE_ADDR){ $visits = file($memo_file); $number_of_last_visit = $visits[0]; $number_of_new_visit = ++$number_of_last_visit; $fp = fopen($memo_file, "w"); $fw = fwrite($fp, $number_of_new_visit);
Time of Update: 2016-07-29
注意本程式使用的表結構為: use test; create table image( id int unsigned auto_increment primary key, description text, filename varchar(50), filesize int,
Time of Update: 2016-07-29
受影響的系統: PHP 3.00 -------------------------------------------------------------------------------- 描述: PHP Version 3.0是一個HTML嵌入式指令碼語言。其大多數文法移植於C、Java和Perl並結合了 PHP的特色。這個語言可以讓web開發人員快速建立動態網頁。 因其執行在web伺服器上並允許使用者執行代碼,PHP內建了稱為'safe_mode'的安全特性,
Time of Update: 2016-07-29
COOKIE函數庫:cookie.inc.php3 if (!isset($__cookie_inc__)){ $__cookie_inc__=1; function JsSetCookie($CName,$CValue,$CExpr=FALSE){ // 這個函數允許你在HTML頭標記之後設定cookie , // 可以作SetCookie函數的補充,甚至代替。 // $CName.....: cookie 的名字 // $CValue....: cookie 的值 // $CEXpr..
Time of Update: 2016-07-29
1,問:為什麼出現“APACHE.EXE: cannot determine local host name.”? 答: 由於Windows版本的Apache預設情況下不指定ServerName,所以運行時會出錯。 解決的辦法是修改Apache安裝目錄下的conf目錄下的httpd.conf: - 搜尋ServerName - 去掉前面的#號 - 把ServerName後面的值換成你自己的設定,如localhost之類的 - 儲存,重新啟動Apache
Time of Update: 2016-07-29
midif2.php $d=dir("./dir"); //得到dir目錄對象 $i="0"; while($entry=$d->read()){ $i=$i+1; if($i>2){ //大於2的目的是去掉目前的目錄的".",和表示前一個目錄的".." $wq[]=$entry; //把目錄明細放入$wq數組中 } } $d->close(); //關閉 ?> List
Time of Update: 2016-07-29
/* PHP Net Toolpack v0.1 08.05.2000, by waddler(@netlife.fi) phpnettoolpack.sourceforge.net To be distributed under GNU GPL */ // whois(hostname [,username, [port]]) Function whois ($a_server, $a_query="", $a_port=43) { $sock = fsockopen($a_server, $
Time of Update: 2016-07-29
UNTITLED include "connect.inc.php"; if ($subject) { $query = "select name,email from user"; $res = mysql_query($query); $row = mysql_fetch_array($res); while ($row) {
Time of Update: 2016-07-29
為什麼要選擇PHP 2. 競爭者:ASP,mod_perl,JSP 用於實現互動式動態網頁的技術有好多,其中CGI又稱通用閘道介面(Common Gateway Interface),是外部程式和WEB伺服器之間的標準編程介面,但是CGI程式帶來的缺點實在太多;而Perl很好地解決了CGI中的問題,被用來驅動複雜的WEB技術;微軟的ASP(Active Server
Time of Update: 2016-07-29
cinput.php3 如下: 輸入 function suiji($max){ srand((double)microtime()*1000000); $x=rand(); $y=getrandmax(); $r=$x/$y*($max-1); $r=round($r++); return $r; } function StrOccurs($sStr, $sFind){ $sTemp=$sStr;
Time of Update: 2016-07-29
/******************************************************* 作者: 吳振亨 (Biz)--phpscript E-mail:wuzhenheng@china.com web: http://phpscript.osh.com.cn 檔案名稱:AdRotator.class.php3 著作權聲明: 如果您使用了本檔案,請給作者寫一封E-mail
Time of Update: 2016-07-29
reply.php(用來回複主題) 疑難問題 if (!$cook_user) {echo "";} else {include ("connect.inc.php"); $query = "select * from my_user where user='".$cook_user."' and password='".$cook_password."'"; $res = mysql_query($query); if (!$res) {echo "";} include
Time of Update: 2016-07-29
我接觸php有段時間了,一直在公司配置好的環境下開發,總想試試自己安裝一下,終於我的同學給了我這個機會。現在我將自己根據本站文章再發表一下我的看法和一點補充。 一,安裝mysql. 首先下載一個軟體包是必須的,然後將其解壓到你的的臨時目錄,點擊安裝程式,根據程式中的說明提示安裝完。 第2步,根據本站的文章應在“開始”---“運行”中鍵如“c:\mysql\bin\mysqld-nt -
Time of Update: 2016-07-29
如果您的使用者找不到他要的頁面,如何給他一個友好的回覆,並且你也知道發生了這個錯誤呢,看看下面這段程式,是用來定製404錯誤頁面和發通知給網管的好東西。---teaman翻譯整理 # 設定 $domain 為你的網域名稱 (注意沒有www) $domain = "oso.com.cn"; # 設定URL,注意沒有後劃線 / $docroot = "http://www.oso.com.cn"; # 設定錯誤資訊的字型 $fontface = "Verdana"; # 設定404頁面的字型大小 $