Time of Update: 2017-01-13
作者:黃冬 PHP:Personal
Time of Update: 2017-01-13
if( isset($_FILES['upImg']) ){ if( $userGroup[$loginArr['group']]['upload'] == 0 ) { echo '{"error":"您所在的使用者組無權上傳圖片!"}'; } else { $savePath =
Time of Update: 2017-01-13
error_reporting(0);session_start();require("config.php");if(!is_dir("temp")){ mkdir("temp",0777);}$c=tempnam("temp","c");$url=DZ."logging.php?action=login"; $ch=curl_init(); c
Time of Update: 2017-01-13
從中文到英語class Google_API_translator {public $out = ""; function translate() { $this->out = ""; $text =
Time of Update: 2017-01-13
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><?phpset_time_limit(0);?><html xmlns="http://www.w3.org/1999/xhtml"><head>&
Time of Update: 2017-01-13
global $charset; if(strlen($string) <= $length) { return $string; } $string = str_replace(array('&', '"', '<', '>'), array('&', '"', '<', '>'), $string); $strcut =
Time of Update: 2017-01-13
function my_file_get_contents($url, $timeout=30) { if ( function_exists('curl_init') ) { $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_RETURNTRANSFER,
Time of Update: 2017-01-13
//下面的函數用於查prfunction zeroFill($a, $b) { $z = hexdec(80000000); if ($z & $a) { $a = ($a>>1); $a &= (~$z); $a |= 0x40000000; $a = ($a>>($b-1)); } else
Time of Update: 2017-01-13
<?php$max_allow_links = 100; // 最大許可檢查的連結數目// 此函數轉載於www.lian123.com,特別鳴謝function my_file_get_contents($url, $timeout=30) { if ( function_exists('curl_init') ) { $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL,
Time of Update: 2017-01-13
環境:64位Ubuntu14.04,i5-3230MPHP5.4.31 with ZendOPcacheNode.JS 0.10.35Node.JS 測試var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/html;charset=UTF-8'});
Time of Update: 2017-01-13
需要用JOOMLA串連另一台伺服器的MSSQL。PHP環境為windows下apps教程erv(apache2.2.4,php教程5.2.3)將php.ini中下面一行前的";"號去掉。;extension=php_mssql.dll搜尋NTWDBLIB.DLL檔案,一般在C:windowssystem32與
Time of Update: 2017-01-13
ajax無重新整理聊天室這裡是用php+ ajax實現聊天室的資料庫結構sql:CREATE TABLE `message` ( `mid` int(20) NOT NULL auto_increment, `msg` varchar(255) NOT NULL, `user` varchar(50) NOT NULL, `time` int(10) NOT NULL, PRIMARY
Time of Update: 2017-01-13
php動態產生gif映像時遇到了一些問題,現已解決,我用的是php4.05(for win32)+apache3.1.2_win32。 問題一:動態產生gif的程式根本轉不起來 我寫了一個關於用php產生gif的例子,運行,發現頁面就是刷不出來,就象是死了一樣,瀏覽器也沒有任何錯誤提示。 解決辦法:修改php所在目錄下的php.ini
Time of Update: 2017-01-13
php 目錄遞迴函式-列出所檔案與目錄用來實現我的需求。函數的原理很簡單,主要就是用了一下遞迴調用。function file_list($path){if ($handle = opendir($path)) {while (false !== ($file = readdir($handle))) {if ($file != "." && $file != "..") {if
Time of Update: 2017-01-13
if ($insert && $insertsql) {php 批量儲存資料與批次更新資料 $keystr = $valstr = $tmp = ''; foreach($insertsql as $key => $val) { if ($val) { $keystr .=
Time of Update: 2017-01-13
class GetImage { var $source;var $save_to;var $quality; function download($method = 'curl') { $info = @GetImageSize($this->source); $mime = $info['mime']; // What sort of image? &
Time of Update: 2017-01-13
php 分頁代碼,支援前10頁與後10頁分頁function multLink($currentPage, $totalRecords, $url, $pageSize = 10){ global $func_message; if ($totalRecords <= $pageSize) return ''; $mult = ''; $totalPages = ceil($totalRecords / $pageSize); $mult
Time of Update: 2017-01-13
php 分頁類函數function getPageBar($count = 0){ $bad_link_color = "#C0C0C0"; $page["url"] =
Time of Update: 2017-01-13
php實用執行個體 採集遠程網站圖片儲存到本地先從文章中把所有<img ...> 用正則 摳出來. $message //文章內容 //正則(這個還不是) $reg = "/<img[^>]*src="(http://(.+)/(.+).(jpg|gif|bmp|bnp))"/isU";
Time of Update: 2017-01-13
php實用圖片浮水印效果代碼<?phpdefine('Water',1);//浮水印方式(0,文字浮水印,1圖片浮水印)define('WaterImg','./water.jpg');//浮水印圖片地址define('WaterNum',0);//浮水印位置,0為隨機,1-9分別為頂左頂中頂右中左中中中右底左底中底右define('WaterX',81);//浮水印長define('WaterY',81);//浮水印高define('WaterType','image/jpeg');//