Time of Update: 2018-12-05
cat get_pipedata.php#!/usr/bin/env php<?php#========================================================#testing how to get data from
Time of Update: 2018-12-05
msg_get_queue — Create or attach to a message queuemsg_queue_exists — Check whether a message queue existsmsg_receive — Receive a message from a message queuemsg_remove_queue — Destroy a message queuemsg_send — Send a message to a message
Time of Update: 2018-12-05
Linux下安裝、啟動MySQL :http://blog.csdn.net/wy3552128/article/details/8143686Linux下安裝、配置、啟動Apache:http://blog.csdn.net/wy3552128/article/details/8143875Mysql和Apache已經安裝成功,接下來我們來安裝、配置PHP環境,編譯PHP5的時候貌似比較複雜,出現了很多問題,都記錄在這裡吧。平台:VMware上虛擬centos4.7宿主機:windows安裝P
Time of Update: 2018-12-05
最近使用了一個ASP版的CMS,準備放到伺服器上時,才探索服務器上面用的Apache2.09,預設不支援Asp。網上流傳的解決辦法就是通過IASP這個程式,來擴充Apache對Asp的支援,但同時又一個問題就是,它必須要有JAVA環境,並且對Apache2以上的版本好像又不怎麼相容。由於伺服器上有兩個PHP的網站,所以只有舍Apache,用IIS了。之前伺服器上已經有PHP的程式,所有只需要簡單配置就行了,網上也有流程,但是在配置的過程中,發現了一個問題,特在此記錄一下,以備後用。不是安裝版的,
Time of Update: 2018-12-05
1 <?php 2 3 $cipher = mcrypt_module_open(MCRYPT_BLOWFISH, '', MCRYPT_MODE_CBC, ''); 4 5 // The block-size of the Blowfish algorithm is 64-bits, therefore our IV 6 // is always 8 bytes: 7 $iv = '12345678'; 8 9
Time of Update: 2018-12-05
以下是通過php的socket擴充模組實現的一個簡單的訊息處理伺服器端:綁定在一個原生連接埠,監聽用戶端的串連,接收資料並轉寄給寄件者之外的所有用戶端 socket_server.php#!/usr/bin/env php<?php//author:zhxiaif(!extension_loaded('sockets')){ die('the sockets extension is not loaded!');}const
Time of Update: 2018-12-05
#author:zhxia給php打上php-fpm 補丁sudo tar jxvf php-5.2.14.tar.bz2sudo patch -d php-5.2.14 -p1 < php-5.2.14-fpm-0.5.14.diff編譯phpcd php-5.2.14/sudo ./configure --prefix=/usr/local/php-5.2.14 --with-mcrypt --with-gettext --with-mysql --with-gd
Time of Update: 2018-12-05
/*擷取圖片新聞列表*/function getPicNews($number=5){ require_once 'include/content_class.php'; $Content=new Content(); $sql='select contentid as id,title,pic,typeid from `cms_content` where pic<>"" order by input_time desc'; $rows=$Content-&
Time of Update: 2018-12-05
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 //author:zhxia
Time of Update: 2018-12-05
//編譯安裝php 5.3.3#author:zhxia 由於php5.3.X已經內建了php-fpm所以不需要打補丁# sudo ./configure --prefix=/usr/local/php-5.3.3 --with-mcrypt --with-gettext --with-mysql --with-gd --with-jpeg-dir --with-png-dir --with-curl --with-freetype-dir --enable-gd-native-ttf --
Time of Update: 2018-12-05
以下函數可用於替換php內建的is_writable函數//可用於替換php內建的is_writable函數function isWritable($filename){ if(preg_match('/\/$/',$filename)){ $tmp_file=sprintf('%s%s.tmp',$filename,uniqid(mt_rand())); return isWritable($tmp_file); } if(file_exists(
Time of Update: 2018-12-05
由於php的進程是不支援多線程的,有些情境為了方便以及提高效能,可以用php實現多進程以彌補這個不足:#!/usr/bin/env php<?php$cmds=array( array('/apps/bin/launcher.php','charge/promotion_props_stat.php','mobile',1),
Time of Update: 2018-12-05
1。 計算目前時間和昨日同時間段的資料問題此問題需要知道目前的時間,以及目前時間減去24後的時間方法一: 使用time()和date()比如:$time=time();$tomorrow=time()+24*3600; //明日的同時間echo ' 4: '.date('Y:m:d H:i:s',$tomorrow);$yestoday=time()+24*3600; //昨日的同時間echo ' 5: '.date('Y:m:d
Time of Update: 2018-12-05
之前介紹了PHP開發工具zend studio7入門使用教程,zend studio的使用其實蠻耗費記憶體的,針對PHP入門學習者,今天和大家分享如何配置Editplus來調試PHP程式,Editplus配置好後進行PHP網站開發其實並不比zend studio遜色,Editplus提供很多使用者工具(外掛程式),比如PHP自動完成、PHP函數自動提醒與補全等,這些都對配置Editplus調試PHP程式帶來了方便,下面我就以PHP教程形式介紹Editplus的配置步驟。準備工作
Time of Update: 2018-12-05
定時執行代碼<?php ignore_user_abort(); // 即使Client斷開(如關掉瀏覽器),PHP指令碼也可以繼續執行. set_time_limit(0); // 執行時間為無限制,php預設的執行時間是30秒,通過set_time_limit(0)可以讓程式無限制的執行下去 $interval=20; // 時間間隔 單位 秒 $key_file="key.txt"; //
Time of Update: 2018-12-05
在linux中直接用"php"命令來執行php檔案 一般在linux命令列下運行php檔案的代碼:linux下執行:#php安裝路徑 -f php檔案路徑 例如:/opt/modules/php/bin/php -f /opt/data/www/yoururl/index.php每次輸入php安裝路徑比較麻煩,其實我們可以不用輸入的哦! 將/opt/modules/php/bin/php 這個檔案複製到/usr/sbin下,php將被安裝為linux命令
Time of Update: 2018-12-05
當你試圖管理網站內容,PHP是個很有效工具,它可以被使用在不同的應用上,比如資料庫,比如廣告管理,內容組織等等。下面的免費的PHP指令碼資源,可以協助你的網站為訪問者提供更佳的動態體驗。Free-Php.netPHP-scripts.comScripts.comHotScripts.comGscripts.netScriptDungeon.comZubrag.comPHP.ResourceIndex.comPHPJunkYard.comTheFreeCountry.com這些PHP指令碼提供了
Time of Update: 2018-12-05
隨著喬布斯的迴歸,iPad2的發布,看來移動端的開發話題越來越火熱了。在此列出一些能夠在iOS的最大競爭者——安卓(Android)系統的檢測方法。 JavaScript判斷方法 搜尋user agent字串中的Android單詞是最省事兒的方法: 1. if(navigator.userAgent.match(/Android/i)) { 2. // Do something! 3. // Redirect to Android-site? 4.
Time of Update: 2018-12-05
一,環境說明: OS:windows server 2003 r2 企業版 SP2; IIS6.0;php-5.2.11;MySql5.1.40; phpMyAdmin-3.2.3-all-languages二,配置PHP步驟 1,將下載下來的php壓縮包解壓到一個目錄,如c:\php 2,設定環境變數,我的電腦->屬性->進階->環境變數->系統變數,
Time of Update: 2018-12-05
DZ安裝總結:一,現在配置PHP環境沒有問題,