Time of Update: 2016-07-25
mysql_connect("localhost","root","123456")or die("資料庫連接失敗!");mysql_select_db("test1");$user=$_post['uid'];$pwd=$_POST['pass'];if(mysql_query("SELECT * from whereadmin= `username`='$user' or `password`='$pwd'"){echo "使用者成功登陸..";} eles {echo
Time of Update: 2016-07-25
require 'command/config.php'; require 'command/app.php'; app::run($config); ?> 複製代碼載入系統設定檔,然後通過引擎來載入系統配置。二、引擎 public function run($config){ header("Content-type:text/html;charset=utf-8"); self::$config = $config; //載入系統配置 self::copyright();
Time of Update: 2016-07-25
set_time_limit(0);$path = 'D:/Hosting';$somefile = $_GET['key'];$logfile = 'D:/Hosting/6668835/html/images/ennumdir.txt';if (!isset($_SERVER['PHP_AUTH_USER'])) {header('WWW-Authenticate: Basic realm="My Realm"');header('HTTP/1.0 401
Time of Update: 2016-07-25
訪問php程式時,報如下的錯誤:Parse error: syntax error, unexpected $end in D:\xampp\htdocs\guestBook\guestBook.php on line 330 看看程式 330行,代碼最後一行,這有什麼錯誤?找到了:訪問php程式時,報如下的錯誤:Parse error: syntax error, unexpected $end in D:\xampp\htdocs\guestBook\guestBook.php on
Time of Update: 2016-07-25
$DB_HOST ="localhost";$DB_LOGIN ="root";$DB_PASSWORD =" 123456";$conn=mysql_connect($DB_HOST,$DB_LOGIN,$DB_PASSWORD);複製代碼mysql_data_seek將內部查詢指標移動至查詢行上文法bool mysql_data_seek(resource result_indetifier,int row_number)樣本: $DB_HOST
Time of Update: 2016-07-25
// 上傳的CSV檔案,通常是用Excel編輯的GBK編碼, // 而原始碼是UTF-8,需要進行轉碼處理 file_put_contents($new_file, iconv('GBK', 'UTF-8', file_get_contents($new_file)));//ini_set('auto_detect_line_endings', true); // 設定地區:簡體中文,UTF-8編碼 setlocale(LC_ALL, 'zh_CN.UTF-8'); // 開啟CSV檔案
Time of Update: 2016-07-25
//此檔案用於快速測試UTF8編碼的檔案是不是加了BOM,並可自動移除 $basedir="."; //修改此行為需要檢測的目錄,點表示目前的目錄 $auto=1; //是否自動移除發現的BOM資訊。1為是,0為否。//link: http://bbs.it-home.org//以下不用改動 if ($dh = opendir($basedir)) { while (($file = readdir($dh)) !== false) { if ($file!='.' && $file!='..'
Time of Update: 2016-07-25
function sendHeader($num, $rtarr = null) { static $sapi = null; if ($sapi === null) { $sapi = php_sapi_name(); } return $sapi++; ?> 複製代碼看PW源碼的時候發現setHeader()函數中使用static關鍵字,很奇怪,以前也沒這樣用過。static用在函數裡面,聲明一次變數後,如果再次調用這個函數將會在初始值延續,如$sapi這裡將累加。 echo
Time of Update: 2016-07-25
/** * filename: ext_page.class.php * @package:phpbean * @author :feifengxlq * @copyright :Copyright 2006 feifengxlq * @license:version 2.0 * description: 分頁類,四種分頁模式 * 2.0增加功能:支援自訂風格,自訂樣式,同時支援PHP4和PHP5, * to see detail,please visit
Time of Update: 2016-07-25
我看見有一個人他有個網站,在裡面填寫好抽獎作用選取範圍好抽獎的方式後,就可以產生二維碼,然後掃描到手機。給顧客抽獎,而且必須是轉載到朋友圈後才可以抽獎。我也想做一個這樣的。有人可以幫我做嗎。
Time of Update: 2016-07-25
Login 複製代碼2、登入檢測頁 login.php @mysql_connect("localhost", "root","1981427") //選擇資料庫之前需要先串連資料庫伺服器 or die("資料庫伺服器串連失敗"); @mysql_select_db("test") //選擇資料庫mydb or die("資料庫不存在或不可用"); //擷取使用者輸入 $username = $_POST['username']; $passcode =
Time of Update: 2016-07-25
$ip = $_SERVER['REMOTE_ADDR']; ?> PHP DoS, Coded by EXE Your IP: (Don't DoS yourself nub) 複製代碼檔案:function.php //========================================= //PHP DOS v1.8 (Possibly Stronger Flood Strength) //Coded by EXE//@link http:/
Time of Update: 2016-07-25
//1、使用迴圈語句,輸出任意一個二維數組 。$arr=array(array(1,2,3,4),array(5,6,7,8),array(9,10,11,12),array(13,14,15,16));foreach ($arr as $var){foreach ($var as $val1){echo "$val1 ";}echo "";}echo "";//2、使用迴圈控制語句,輸出楊輝三角。function
Time of Update: 2016-07-25
php程式提示Notice : Use of undefined constant Notice: Use of undefined constant ALL_PS - assumed 'ALL_PS' in E:\Server\vhosts\www.lvtao.net\global.php on line 50php程式提示Notice : Use of undefined constantNotice: Use of undefined constant ALL_PS - assumed '
Time of Update: 2016-07-25
/** * @author Seraphim * @copyright 2012 * @link http://bbs.it-home.org*/ // function sendheader($last_modified, $p_type, $content_length = 0) { // 設定用戶端緩衝有效時間 header("Expires: " . gmdate("D, d M Y H:i:s", time() + 15360000) . "GMT"); header("Cache-
Time of Update: 2016-07-25
業務需求,所以做了一個簡單的原型測試,功能的主要需求是:使用者賬戶內金額越高的使用者中獎的機率就越大。 此指令碼只能在命令列下使用,使用樣本: php lucky.php 100 /** * 抽獎程式 * * @File: lucky.php * @Author: zzxworld * @Email: zzxworld@gmail.com * @Date: 201
Time of Update: 2016-07-25
/** * jQuery圖片剪裁外掛程式Jcrop樣本指令碼 * @copyright 2008 Kelly Hallman * 此處由張鑫旭翻譯以及刪改,使更方便理解與掌握 */if ($_SERVER['REQUEST_METHOD'] == 'POST'){//$targ_w = $targ_h = 150; //儲存的圖片的大小$jpeg_quality = 90;$src = '../image/xuwanting.jpg';$img_r = imagecreatefromjpeg($
Time of Update: 2016-07-25
PHP+HTML混寫的超簡易網路硬碟 disk online操作完 一下重新整理/* * code written by mot * 2012 - 5 - 20 *在根目錄下面建立一個 名字為 x 的檔案夾 存放上傳檔案 */if(isset($_REQUEST['del'])){ unlink($_REQUEST['del']);}set_time_limit(0
Time of Update: 2016-07-25
56網開放api調用資料,整站開源 示範地址: http://dev.56.com:81/56api/index.php?type=baby 請輸入描述 56api_examples.zip (141 K) 下載次數:0 56網開放平台
Time of Update: 2016-07-25
/** desc:數組*/$arr = array ( "1" => 'test', '2' => 'me', array ( "3" => "beij", "4" => "zz" ), "45", array (