Time of Update: 2017-01-13
ecshop經常出現報錯$data 未定義。導致整站致命錯誤!經過分析,,導致檔案shop_config.php寫入失敗。資料大小為0。從而影響整站不能訪問!這種錯誤是很致命的!解決辦法:開啟lib_base.php 尋找include_once($cache_file_path);在其後加入一行代碼$data = !empty($data)?$data:false; 動態 的意思是 在讀取 配置快取檔案失敗的情況下 程式會直接讀取資料庫記錄 並 重建 配置快取檔案。 這樣就解決了
Time of Update: 2017-01-13
將之前的ecshop確認收貨頁面改成如下格式://確認頁面$act = !empty($_REQUEST['act']) ? rawurldecode(trim($_REQUEST['ver'])) : 'confirm'; // 驗證碼if($act == 'confirm'){$msg = $order['order_sn']."確認收貨?<button onclick=\"location.href='receive.php?act=receive&id=
Time of Update: 2017-01-13
一、關於淘寶IP地址庫我們目前提供的服務包括:1. 根據使用者提供的IP地址,快速查詢出該IP地址所在的地理資訊和地理相關的資訊,包括國家、省、市和電訊廠商。2. 使用者可以根據自己所在的位置和使用的IP地址更新我們的服務內容。我們的優勢:1. 提供國家、省、市、縣、電訊廠商全方位資訊,資訊維度廣,格式規範。2. 提供完善的統計分析報表,省準確度超過99.8%,市準確度超過96.8%,資料品質有保障。二、介面說明1. 請求介面(GET):http://ip.taobao.com/service/
Time of Update: 2017-01-13
我看了那篇《怎樣在PHP中通過ADO調用Asscess資料庫和COM程式》文章後,馬上作了測試,結果失敗了。傷心是不是。怎麼辦?我只好去PHP官方網站求助,皇天不負有心人,終於我找到了答案—— 具體的解決方案如下:
Time of Update: 2017-01-13
//擷取標題 $inarr = array(); preg_match("/<title>(.*)</title>/isU",$body,$inarr); if(isset($inarr[1])) { $redatas['title'] =
Time of Update: 2017-01-13
第一種:利用模板。目前PHP的模板可以說是很多了,有功能強大的smarty,還有簡單易用的smarttemplate等。它們每一種模板,都有一個擷取輸出內容的函數。我們產生靜態頁面的方法,就是利用了這個函數。用這個方法的優點是,代碼比較清晰,可讀性好。 這裡我用smarty做例子,說明如何產生靜態頁require('smarty/Smarty.class.php');$t = new Smarty;$t->assign("title","Hello
Time of Update: 2017-01-13
$TheUrl="http://www.google.cn/search?q=+site:".$q."&num=20&complete=1&hl=zh-CN&lr=&newwindow=1&as_qdr=".$t."&start=".$p."&sa=N"; $TheThie=GetPage($TheUrl);} $TheBody=Ge
Time of Update: 2017-01-13
class Makehtml{ public $MbUrl,$OutUrl,$AllHtml,$SouChar,$ObjChar; //變數 public $row; //遊標 public $Shuzusou,$Shuzuobj; //替換的字串數組 //-----------------------初始化-------------------------
Time of Update: 2017-01-13
$title.='管理記錄';$content.='<ul class="clist">';$page=(isset($_GET['page']) && intval($_GET['page'])>0)?intval($_GET['page']):1;$q_aop=sprintf('select a.*, b.name, b.photo from %s as a, %s as b where a.aid=b.id order by
Time of Update: 2017-01-13
<?php/////////////////////////////////////////////////////////////////////////////// 迷你同學錄 (http://www.piscdong.com/?m=mini_class)//// (c)PiscDong studio (http://www.piscdong.com/)//// 程式完全免費,請保留這段代碼。// 請勿出售本程式或其修改版,請勿利用本程式或其修改版進行任何商務工作。//////////
Time of Update: 2017-01-13
<?php//儲存報像頭上傳的圖片.define('SD_ROOT', dirname(__FILE__).'/');@header("Expires: 0");@header("Cache-Control: private, post-check=0, pre-check=0, max-age=0", FALSE);@header("Pragma: no-cache");$pic_id =
Time of Update: 2017-01-13
(1) 使用“<?”和“?>”來包含PHP編寫的WML程式行,格式為:<?……(程式行);?>(2)
Time of Update: 2017-01-13
main.php<script language="javascript" src="initajax.js"></script><!--InitAjax()--><script><!--function getoption(select1,target){ if(select1.value!=0){
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"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta
Time of Update: 2017-01-13
if($_FILES['image']['size']){ if($_FILES['image']['type'] == "image/pjpeg"){ $im =
Time of Update: 2017-01-13
我們這裡是把檔案重新命名了,就是用到了rename函數哦,好了費話我也不說多了我們來看看這個讀取目錄檔案然後給檔案命名的代碼吧。function CheckDir($dir_path){ if(is_dir($dir_path))
Time of Update: 2017-01-13
<?php@session_start();require_once("../Inc/Conn.php");require_once("../Inc/function.php");$filepath = '../userhead/';$filename = time().mt_rand(10,100);//$uid = get_id($_SESSION['uname']);$uid = 14;if
Time of Update: 2017-01-13
<?php// $parent is the parent of the children we want to see// $level is increased when we go deeper into the tree,// used to display a nice indented treefunction display_children($parent, $level) { &
Time of Update: 2017-01-13
<?php require_once("../Inc/Conn.php"); require_once("../Inc/function.php"); /* 接收flash post 資料 Date"2009.04.24 */ $User_Name =
Time of Update: 2017-01-13
取得當前檔案的路徑今天一般用下面二個函數了。getcwd() 函數getcwd -取得當前工作目錄描述 字串getcwd (無效) 擷取當前的工作目錄。傳回值 返回當前工作目錄上的成功,或FALSE的失敗。在某些Unix的變種, getcwd ( )將返回FALSE ,如果任何一個父目錄沒有可讀或搜尋模式設定,即使在目前的目錄沒有。見搭配chmod ( )以擷取更多資訊的方式和許可權。執行個體例如# 1 getcwd ( )的例子dirname(__FILE__)先行編譯和宏定義,預定義常量,_