ecshop基礎函數列表大全

巴扎黑
發布: 2016-11-23 15:52:17
原創
1141 人瀏覽過

lib_time.php 
gmtime() 
P: 取得目前格林威治時間的時間戳記/$0 
server_timezone() 
P: 取得伺服器的時區/$0 
local_mktime($hour = NULLtime($humd = NULL, $month = NULL, $day = NULL, $year = NULL) 
P: 產生一個使用者自訂時區日期的GMT時間戳 
local_date($format, $time = NULL) 
P: 將GMT時間戳格式化為使用者自訂時區日期 
gmstr2time($str) 
P: 轉換字串形式的時間表達式為GMT時間戳 
local_strtotime($str) 
P: 將一個使用者自訂時區的日期轉為GMT時間戳 
local_gettime($timestamp = NULL) 
P: 取得使用者所在時區指定的時間戳 
local_getdate($timestamp = NULL) 
P: 取得使用者所在時區指定的日期和時間資訊 
str, $length = 0, $append = true) 
P: 截取UTF-8編碼下字串的函數 
real_ip() 
P: 取得使用者的真實IP位址 
str_len($str) 計算
P: 
P: 的長度(漢字依照兩個字元計算) 
get_crlf() 
P: 取得使用者作業系統的換行符 
send_mail($name, $email, $subject, $content, $type = 0, $notification=false) 
P: 郵件發送 
gd_version() 
P: 取得伺服器上的GD 版本 
file_get_contents($file) 
P: 如果系統不存在file_get_contents函數則宣告該函數則為 $ ) 
P: 如果系統不存在file_put_contents函數則聲明函數 
floatval($n) 
P: 如果系統不存在floatval 函數則聲明函數 
file_mode_info($file_path) 
rite: 檔案或目錄編號($arg, $file = '', $line = '') 
P: 寫入日誌內容 
make_dir($folder) 
P: 檢查目標資料夾是否存在,如果不存在則自動建立該目錄 
gzip_enabled( ) 
P: 取得系統是否啟用了gzip 
addslashes_deep($value) 
P: 遞歸方式的對變數中的特殊字元進行轉義 
addslashes_deep_obj($obj) 
P: 將物件成員變數進行轉義 
stripslashes_deep($value) 
P: 遞歸方式的對變數中的特殊字元去除轉義 
make_semiangle($str) 
P: 將一個字串中含有全角的數字字元、字母、空格或空格'%+字母、空格或空格'%+ -()'字元轉換為對應半角字元 
check_file_type($filename, $realname = '', $limit_ext_types = '') 
P: 檢查檔案類型/檔案名稱/真實檔案名稱/允許的檔案類型 
my_like_quote($like_quote($like_quotesql str) 
P: 將MYSQL LIKE 的內容轉義過濾掉_ %等字元. 
real_server_ip() 
P: 取得伺服器的ip 
ecs_header($string, $replace =自訂header 函數,用於過濾可能出現的安全隱患 
ecs_iconv($source_lang, $target_lang, $source_string = '') 
P: 自訂的編碼轉換 
ecs_geoip($ip).使用IP函式庫 
trim_right($str) 
P: 移除字串右側可能出現的亂碼 
move_upload_file($file_name, $target_name = '') 
P: 將上傳檔案轉移到指定位置 
P: 傳遞JSON的參數轉碼 
get_file_suffix($file_name, $allow_type = array()) 
P: 取得檔案後綴名,並判斷是否合法 
read_static_cache($cache_name) ache
: 快取$cache_name, $caches) 
P: 寫結果快取檔案 

lib_common.php (公用函式庫) 
db_create_in($item_list, $field_name = '') 
P: 建立像這樣的查詢: "IN('aa' ,'b')" $item_list為陣列 
is_email($user_email) 
P: 驗證輸入的郵件位址是否合法 
is_time($time) 
P: 檢查取得查詢時間和次數,並賦值給smarty 
region_result($parent, $sel_name, $type) 
P: 創建地區的回傳資訊 
get_regions($type = 0, $parent = 0) 
P: 取得指定國家的P:所有省份, 函數需要資料庫支援. 
get_shipping_config($area_id) 
P: 取得配送區域中指定的配送方式的配送費用的計算參數例如快速公司不同. 
init_users() 
P: 初始化會員資料整合類別($cat_id = 0, $selected = 0, $re_type = true, $level = 0, $is_show_all = true) 
P: 取得指定分類下的子分類的陣列, $re_type控制回傳類型 
cat_options($spec_cat_id,$specspec_cat_id, $arr) 
P: 過濾和排序所有分類,回傳一個有縮排等級的陣列 
load_config() 
P: 載入設定資料 
get_brand_list() 
P: 取得品牌清單 
get_brands($cat = 00, $app = ' brand') 
P: 取得某個分類下的品牌清單 
get_promotion_info($goods_id = '') 
P: 所有的促銷活動資訊 
get_children($cat = 0) 
P: 取得指定下所有底層分類的分類ID 
get_article_children ($cat = 0) 
P: 取得指定文章分類下所有底層分類的ID 
get_mail_template($tpl_name) 
P: 取得郵件範本 
_action($dmorder, $action_sstatd. note = '', $username = null) 
P: 記錄訂單作業記錄 
price_format($price, $change_price = true) 
P: 格式化商品價格 
get_virtual_goods($order_id, $錯誤 = fse) $訂單中的虛擬商品記錄是否出貨. 
virtual_goods_ship(&$virtual_goods, &$msg, $order_sn, $return_result = false, $process = 'other') 
_P: 虛擬商品出貨 $
virtual_card,P: 虛擬商品出貨 $ order_sn, &$msg, $process = 'other') 
P: 虛擬卡片出貨 
virtual_card_result($order_sn, $goods) 
P: 傳回虛擬卡片資訊的結果 
clear_tpl_files($is_cache = true, $ext = '') 
P: 清除指定後綴的範本快取或編譯檔案 
clear_compiled_files($ext = '') 
P: 清除模版編譯檔案'') 
P: 清除快取檔案 
clear_all_files($ext = '') 
P: 清除範本編譯與快取檔案 
smarty_insert_scripts($args) 
P: 頁面上所呼叫的檔案組合功能. params) 
P: 建立分頁的清單 
build_uri($app, $params, $append = '', $page = 0, $size = 0) 
P: 重寫URL 位址 
formated_weight($weight): 🎠格式化重量 
log_account_change($user_id, $user_money = 0, $frozen_money = 0, $rank_points = 0, $pay_points = 0, $change_desc = '', $change_type = ACT_OTHER) 
P: 記錄帳號變動(clewhiarts> cat_id = 0, $selected = 0, $re_type = true, $level = 0) 
P: 取得指定分類下的子分類的陣列/ 向下取陣列. 
article_cat_options($spec_cat_id, $arr) 
article_cat_options($spec_cat_id, $arr) P: 過濾和排序所有文章分類,傳回一個有縮排等級的陣列 
uc_call($func, $params=null) 
P: 呼叫UCenter的函數 
exception_handler($errno, $errstr, $errfile, $errline) 
: error_handle回呼函數未啟用. 
get_image_path($goods_id, $image='', $thumb=false, $call='goods', $del=false) 
P: 重新取得商品圖片與商品相簿的地址 ($func, $params = null) 
P: 呼叫使用UCenter外掛程式時的函數 
get_volume_price_list($goods_id, $price_type = '1') 
P: 取得商品優惠價格 
get_final_price($goodsnum; 1', $is_spec_price = false, $spec = array()) 
P: 取得商品最終使用價格 
get_package_info($id) 
P: 取得指定id package 的資訊 
get_package_goods($age_package_good)的商品 

lib_main.php (前台公用函式庫) 
update_user_info() 
P: 更新使用者SESSION,COOKIE及登入時間、登入次數。
get_user_info($id=0) 
P: 取得使用者資訊陣列 
assign_ur_here($cat = 0, $str = '') 
P: 取得目前位置與頁標題 
get_parent_cats(P: 取得目前位置與頁標題 
get_parent_cats($cat) 取得指定分類的所有上級分類 
build_pagetitle($arr, $type = 'category') 
P: 根據提供的陣列編譯成頁面標題 
build_urhere($arr, $type = 'category') 
build_urhere($arr, $type = 'category') 
P: 根據提供的陣列編譯成目前位置 
assign_dynamic($tmp 
P: 取得指定頁面的動態內容 
assign_articles($id, $num) 
P: 指派文章清單給smarty 
get_sign_help(c)) $ cat, $record_count, $size, $sort, $order, $page = 1,$keywords = '', $brand = 0, $price_min = 0, $price_max = 0, $display_type = 'list', $filter_attr= '', $url_format='', $sch_array='') 
P: 建立分頁資訊.分頁函數. 
get_pager($url, $param, $record_count, $page = 1, $size = 10) 
P:產生給pager.lbi賦值的陣列 
get_vote($id = '') 
P: 呼叫調查內容 
get_user_browser() 
P: 取得瀏覽器名稱和版本 
is_spider($record = true) 
P: 判斷是否為搜尋引擎蜘蛛 
get_os() 
P: 取得客戶端的作業系統 
visit_stats() 
P: 統計存取資訊:003save_search儲存搜尋引擎關鍵字 
get_tags($goods_id = 0, $user_id = 0) 
P: 取得指定使用者、商品的所有標記 
get_dyna_libs($theme, $tmp) 
P: 取得指定主題某個範本的主題的動態模組 
dyna_libs_replace($matches) 
P: 換動態模組 
upload_file($upload, $type) 
P: 處理上傳文件,並返回上傳圖片名稱($$upload, $type) 
P: 處理上傳文件,並返回上傳圖片名稱($$ , $links = '', $hrefs = '', $type = 'info', $auto_redirect = true) 
P: 顯示一個提示訊息 
parse_rate_value($str, &$operate) 
P: 將一個形如+ 10, 10, -10, 10%的字串轉換為對應數字,並回傳操作符號 
recalculate_price() 
P: 重新計算購物車中的商品價格:目的是當使用者登入時享受會員價格,當使用者登出登入時不享有會員價格 
assign_comment($id, $type, $page = 1) 
P: 查詢註解內容 
assign_template($ctype = '', $catlist = array()) 
P: 預設的smarty賦值time2gmt($time) 
P: 將一個本地時間戳轉成GMT時間戳 
get_user_bonus($user_id = 0) 
P: 詢問會員的紅包金額 
set_affiliate(): 存
P: 保存推薦: 取得推薦uid 
article_categories_tree($cat_id = 0) 
P: 取得指定分類同級的所有分類以及該分類下的子分類 
get_article_parent_cats($cat)/Pampumb; $library, $template = null) 
P: 取得某模板某庫設定的數量 
get_navigator($ctype = '', $catlist = array()) 
P: 取得自訂導覽列資料列: 授權資訊內容 

lib_insert.php (動態內容函式庫) 
insert_query_info() 
P: 取得查詢次數與查詢時間 
insert_history() 
P: 來呼叫歷史insert_ads($arr) 
P: 調用指定的廣告位的廣告 
insert_member_info() 
P: 調用會員資訊 
insert_comments($arr) 
P: 呼叫線上評論資訊? lib_goods.php (商品相關函數庫) 
goods_sort($goods_a, $goods_b) 
P: 商品推薦usort用自訂排序行數 
get_categories_tree($cat_id = 0) 
P:此分類下的子分類 
get_child_tree($tree_id = 0) 
P: 取並指定分類ID下的分類樹 
get_top10($cats = '') 
P: 調用目前分類的銷售排行榜
get_retypem_goods($commend_goods( = '', $cats = '') 
P: 取得推薦商品 
get_promote_goods($cats = '') 
P: 取得促銷商品 
get_category_recommend_goods($type = '', $cats = '', $category_recommend_goods($type = '', $cats = '', $brand' , $min =0, $max = 0, $ext='') 
P: 取得指定分類下的推薦商品 
get_goods_info($goods_id) 
P: 取得商品的詳細資料 
get_goods_properties($goods_properties($good取得商品的屬性與規格 
get_same_attribute_goods($attr) 
P: 取得相同屬性的商品 
get_goods_gallery($goods_id) 
P: 取得相同的商品') 
P: 取得指定分類下的商品 
assign_brand_goods($brand_id, $num = 0, $cat_id = 0) 
P: 取得指定的品牌下的商品 
get_extension_goods($cats):所有屬於指定分類的商品ID 
bargain_price($price, $start, $end) 
P: 判斷某商品是否正在特價促銷期間 
spec_price($spec) 
P: 取得指定的規格的價格的價格group_buy_id, $current_num = 0) 
P: 取得團購活動資訊 
group_buy_stat($group_buy_id, $deposit) 
P: 取得某團購活動統計資料 
group_buy_status($$buy): 取得某團購活動統計資料 
group_buy_status($$buy): 取得。 , $config = false) 
P: 取得拍賣活動資訊 
auction_log($act_id) 
P: 取得拍賣活動出價記錄 
auction_status($auction) 
P: ($goods_id) 
P: 取得商品資訊 
favourable_info($act_id) 
P: 取得優惠活動資訊 
wholesale_info($act_id) 
P: 批發訊息 
add_style($goods_name, $style) 
P: 加入商品名稱 
get_goods_attr($goods_id) 
P: 取得商品屬性: 取得購物車中商品的配件 

lib_article.php (文章及文章分類相關函數庫) 
get_cat_articles($cat_id, $page = 1, $size = 20 ,$requirement='') 取得文章分類下方的文章清單 
get_article_count($cat_id ,$requirement='') 
P: 取得指定分類下的文章總數 

相關標籤:
php
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!