API Documentation
Table of Contents
Namespaces
Interfaces
Classes
- FormValidate
- 用于验证表单中的validate
- ComposerAutoloaderInit5f0a856db0eb13be86d63b013a8d9e03
- Error
- TypeError
- GetAllHeadersTest
- Normalizer
- ArithmeticError
- AssertionError
- DivisionByZeroError
- Error
- ParseError
- TypeError
- di
- global $di; $di = new di(); $di->adapter = new adapter();
- SCSS
- rpc_php
- model
- Vue
- 用于生成vue2或vue3的JS代码
- Yii_CJavaScriptExpression
- CJavaScriptExpression represents a JavaScript expression that does not need escaping.
Traits
- RPC_START
- RPC trait
Constants
- APP_FORM_PATH = \VEN_ELEMENT_FORM_PATH
- DS = \DIRECTORY_SEPARATOR
- HELPER_DIR = __DIR__
- IDNA_ALLOW_UNASSIGNED = 1
- IDNA_CHECK_BIDI = 4
- IDNA_CHECK_CONTEXTJ = 8
- IDNA_DEFAULT = 0
- IDNA_ERROR_BIDI = 2048
- IDNA_ERROR_CONTEXTJ = 4096
- IDNA_ERROR_DISALLOWED = 128
- IDNA_ERROR_DOMAIN_NAME_TOO_LONG = 4
- IDNA_ERROR_EMPTY_LABEL = 1
- IDNA_ERROR_HYPHEN_3_4 = 32
- IDNA_ERROR_INVALID_ACE_LABEL = 1024
- IDNA_ERROR_LABEL_HAS_DOT = 512
- IDNA_ERROR_LABEL_TOO_LONG = 2
- IDNA_ERROR_LEADING_COMBINING_MARK = 64
- IDNA_ERROR_LEADING_HYPHEN = 8
- IDNA_ERROR_PUNYCODE = 256
- IDNA_ERROR_TRAILING_HYPHEN = 16
- IDNA_NONTRANSITIONAL_TO_ASCII = 16
- IDNA_NONTRANSITIONAL_TO_UNICODE = 32
- IDNA_USE_STD3_RULES = 2
- INTL_IDNA_VARIANT_2003 = 0
- INTL_IDNA_VARIANT_UTS46 = 1
- PHP_FLOAT_DIG = 15
- PHP_FLOAT_EPSILON = 2.2204460492503E-16
- PHP_FLOAT_MAX = 1.7976931348623157E+308
- PHP_FLOAT_MIN = 2.2250738585072E-308
- PHP_INT_MIN = ~\PHP_INT_MAX
- PHP_OS_FAMILY = \Symfony\Polyfill\Php72\Php72::php_os_family()
- PHP_VERSION_ID = $RandomCompatversion[0] * 10000 + $RandomCompatversion[1] * 100 + $RandomCompatversion[2]
- RANDOM_COMPAT_READ_BUFFER = 8
- RANDOM_COMPAT_READ_BUFFER = 8
- thefunpower_mongo_dir = __DIR__
- U_IDNA_ACE_PREFIX_ERROR = 66564
- U_IDNA_CHECK_BIDI_ERROR = 66562
- U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR = 66568
- U_IDNA_ERROR_LIMIT = 66569
- U_IDNA_ERROR_START = 66560
- U_IDNA_LABEL_TOO_LONG_ERROR = 66566
- U_IDNA_PROHIBITED_ERROR = 66560
- U_IDNA_STD3_ASCII_RULES_ERROR = 66563
- U_IDNA_UNASSIGNED_ERROR = 66561
- U_IDNA_VERIFICATION_ERROR = 66565
- U_IDNA_ZERO_LENGTH_LABEL_ERROR = 66567
- U_STRINGPREP_CHECK_BIDI_ERROR = 66562
- U_STRINGPREP_PROHIBITED_ERROR = 66560
- U_STRINGPREP_UNASSIGNED_ERROR = 66561
- VEN_ELEMENT_FORM_PATH = __DIR__ . '/form'
Functions
- in_api() : mixed
- 判断在api接口中
- get_app_header() : mixed
- 取header
- is_app_req() : mixed
- 使用header判断是app接口请求
- get_m_c_a() : mixed
- 取模块、控制器、动作
- get_module_list() : mixed
- 模块列表
- has_module() : mixed
- 是否存在模块
- is_app_api_req() : mixed
- 是否是api控制器请求
- index_url() : mixed
- index_url().'/scrm/site/index' 配置 index_url 如 $config['index_url'] = 'index.php';
- set_menu_group() : mixed
- get_login_cid() : mixed
- 获取unipush的cid 用于推送
- create_user_by_openid() : mixed
- 用openid创建帐号
- get_user_by_phone() : mixed
- 根据手机号获取帐号,如不存在支持创建帐号
- set_user_token() : mixed
- 获取手机号后设置token
- set_user_openid() : mixed
- 记录用户的openid
- get_user_openid() : mixed
- 取用户OPENID
- get_user_avatar_url() : mixed
- 处理用户头像、昵称
- get_comment_status() : mixed
- get_comment_status_color() : mixed
- get_comment() : mixed
- 取一条评论信息
- get_comments() : mixed
- 获取评论
- get_comment_row() : mixed
- comment row
- add_comment() : mixed
- 添加评论
- update_comment() : mixed
- 更新评论
- get_media_by_url() : mixed
- 取资源信息
- applet_image_init() : mixed
- https://image.intervention.io/v2/introduction/installation
- get_notify() : mixed
- 获取提醒
- read_notify() : mixed
- 已读
- get_notify_count() : mixed
- 获取未读数量
- add_notify() : mixed
- 添加提醒
- applet_image_resize() : mixed
- 图片缩放
- applet_create_qr() : mixed
- 生成二维码 content title logo name brower 其中 brower=>1时不生成文件 applet_create_qr([ 'title'=>'', 'content'=>'', 'brower'=>1, 'size'=>100, //不用CDN地址,直接返回本地相对地址 'no_cdn'=>1, ]);
- get_rand_jp() : mixed
- 用户抽奖 $prize_arr = array( array('node_id'=>1,'prize'=>'平板电脑','v'=>10,'num'=>3), array('node_id'=>2,'prize'=>'数码相机','v'=>10,'num'=>1), ); $nid = 1; pr(get_rand_jp(100,$nid,$prize_arr));
- _get_rand_jp() : mixed
- get_pf_amount() : mixed
- 平分金额
- get_rand_amount() : mixed
- 随机金额
- applet_qr_parse() : mixed
- applet_barcode() : mixed
- 条形码 composer require picqer/php-barcode-generator
- applet_check_captch_tencent() : mixed
- 腾讯云验证码
- applet_use_captch_tencent() : mixed
- get_phone_send_vue() : mixed
- VUE 验证 腾讯验证码或者图形验证码
- get_phone_send_form() : mixed
- get_blog_status() : mixed
- get_blog_status_color() : mixed
- get_blog() : mixed
- get_blog_row() : mixed
- get_like_pager() : mixed
- get_like_blog() : mixed
- 是否是我喜欢的 当user_id为空,且limit>1时,返回blog被喜欢的数组
- get_like_blog_pager() : mixed
- 对动态点赞的会员
- get_like_blog_count() : mixed
- 喜欢数量
- like_blog() : mixed
- 喜欢或取消喜欢
- get_follow_blog_count() : mixed
- 关注数量
- get_blog_follow_user() : mixed
- 就否关注
- follow_blog() : mixed
- 关注
- blog_antiporn() : mixed
- 文本+图片审核
- del_node() : mixed
- 删除node
- get_nodes() : mixed
- 多条记录
- get_node() : mixed
- 一条记录
- get_cck_field() : mixed
- get_cck_field_by_builder() : mixed
- update_node() : mixed
- 强制更新数据
- save_node() : mixed
- 保存node
- get_node_more_field() : mixed
- 追回其他字段
- get_node_data_filter() : mixed
- 数据处理
- get_node_pager() : mixed
- cck分页
- get_node_tree() : mixed
- cck tree
- get_cck_table() : mixed
- node 表名 ,添加 node_
- remove_cck_table() : mixed
- node 表名,移除node_
- get_init_cck() : mixed
- cck init
- get_node_where() : mixed
- 分页、列表统一处理where
- get_cck_author_where() : mixed
- 仅操作自己
- form_builder_field() : mixed
- $filed = form_builder_field('fn or name',$old_field); set_field_allow('scrm_customer',$field);
- form_builder() : mixed
- 构建表单 使用 /form/builder
- form_create() : mixed
- form_field_type() : mixed
- builder 字段
- merge_form_field() : mixed
- 合并原字段及自定义字段
- get_city_area() : mixed
- 省市区 由命令行 php think get_city --ansi 生成
- form_get_city() : mixed
- 同 get_city_area()
- __() : mixed
- think_validate https://github.com/vlucas/valitron
- cache() : mixed
- 缓存 加前缀 CACHE_PRE
- table_sortable() : mixed
- host() : mixed
- is_admin() : mixed
- 判断是超管
- is_admin_login() : mixed
- 判断是普通管理员
- get_admin_user() : mixed
- 取管理员信息
- get_user() : mixed
- 取用户信息
- admin_header() : mixed
- admin_footer() : mixed
- admin_access_to_yunyin() : mixed
- 管理员权限同步给运营
- admin_access() : mixed
- 管理员权限
- add_admin_access() : mixed
- get_admin_access_table() : mixed
- get_admin_access() : mixed
- get_admin_access_menu() : mixed
- think_vue_media_button() : mixed
- think_vue_media_one_button() : mixed
- think_vue_media() : mixed
- app_boot() : mixed
- order_num() : mixed
- insert_trace() : mixed
- 记录日志
- get_trace() : mixed
- 获取操作记录
- star_phone() : mixed
- 手机号显示 ****
- vue_add_media_muit() : mixed
- 多图上传
- vue_add_media() : mixed
- 单图上传
- rpc_server_auth() : mixed
- 检测RPC服务是否可用 $client = rpc_client($url); $info = $client->get_info([ 'device_id'=>'', 'device_key'=>'', ]);
- rpc() : mixed
- 调用远程RPC服务,如果远程的应用模块需要放在本地,可以把远程的模块复制到本项目下。 然后把数据库中对应的RPC URL删除,不需要改动其他代码,就可以不发起远程调用,而直接调用本地函数
- format_money() : mixed
- 格式化数字 因mongodb对字段类型要求严格
- rand_password() : mixed
- 生成安全的随机密码函数
- view() : mixed
- view
- common_init() : mixed
- 初始化RPC请求参数及Redis
- get_allow_mime() : mixed
- 获取允许上传的mime
- file_upload_button() : mixed
- 文件上传 不同于图片上传,文件上传仅支持点击按钮直接上传,不支持从文件库中选择文件
- google_authenticator() : mixed
- GOOGLE验证器 验证
- google_authenticator_create() : mixed
- GOOGLE验证器 生成secret
- set_record() : mixed
- 记录
- get_record() : mixed
- 获取记录
- load_app_php() : mixed
- 加载 app/目录/app.php文件
- load_hook_php() : mixed
- 加载 hook/目录/hook.php文件
- get_node_fav_is() : mixed
- 处理常用的主题收藏等类似操作。 是否收藏
- get_node_favs() : mixed
- 收藏列表
- get_node_fav_count() : mixed
- 主题 收藏数量
- set_node_fav() : mixed
- 收藏或取消收藏
- get_user_tag() : mixed
- cdn_url() : mixed
- add_cdn_url() : mixed
- 设置CDN # CDN 激活 active_cdn = 1 # CDN 地址 支持以,分隔 CDN_URL = https://mac1.qihetaiji.com,https://mac.qihetaiji.com
- get_admin_tag() : mixed
- llc_encode() : mixed
- 使用公钥加密
- llc_decode() : mixed
- 使用私钥解密 用户只保留了私钥。
- llc_powerby() : mixed
- mp_jieba() : mixed
- 分词
- mp_init() : mixed
- get_mp_config() : mixed
- mp_create_qr() : mixed
- 二维码 QR_SCENE 临时二维码 QR_LIMIT_SCENE永久二维码
- mp_get_user_info() : mixed
- 获取用户基本信息(UnionID机制) https://developers.weixin.qq.com/doc/offiaccount/User_Management/Get_users_basic_information_UnionID.html#UinonId openid、subscribe、unionid、qr_scene、qr_scene_str subscribe 1已关注
- get_oauth2_wps_title() : mixed
- get_oauth2_page_header() : mixed
- get_oauth2_page_footer() : mixed
- publish_oauth2_img() : mixed
- get_oauth2_access_token() : mixed
- get_oauth2_access_token_by_state() : mixed
- MyXpanfileprecreate() : bool|Fileprecreateresponse
- MyPcssuperfile2() : mixed
- MyXpanfilecreate() : mixed
- fileupload() : mixed
- filemeta() : mixed
- MyXpanfileimagelist() : mixed
- MyXpanfiledoclist() : mixed
- MyXpanfilesearch() : mixed
- MyXpanfilelist() : mixed
- userinfo() : mixed
- MyApiQuota() : mixed
- MyXpannasuinfo() : mixed
- multimediafile() : mixed
- MyXpanmultimediafilemetas() : mixed
- MyXpanfilelistall() : mixed
- auth() : mixed
- MyOauthTokenAuthorizationCode() : bool|OauthTokenAuthorizationCodeResponse
- MyOauthTokenRefreshToken() : mixed
- MyOauthTokenDeviceCode() : mixed
- MyOauthTokenDeviceToken() : mixed
- filemanager() : mixed
- MyFilemanagercopy() : mixed
- MyFilemanagermove() : mixed
- MyFilemanagerrename() : mixed
- MyFilemanagerdelete() : mixed
- composerRequire5f0a856db0eb13be86d63b013a8d9e03() : void
- RandomCompat_strlen() : int
- strlen() implementation that isn't brittle to mbstring.func_overload
- RandomCompat_substr() : string
- substr() implementation that isn't brittle to mbstring.func_overload
- RandomCompat_intval() : float|int
- Cast to an integer if we can, safely.
- random_bytes() : string
- We don't have any more options, so let's throw an exception right now and hope the developer won't let it fail silently.
- random_bytes() : string
- Windows with PHP < 5.3.0 will not have the function openssl_random_pseudo_bytes() available, so let's use CAPICOM to work around this deficiency.
- random_bytes() : string
- Unless open_basedir is enabled, use /dev/urandom for random numbers in accordance with best practices
- random_bytes() : string
- If the libsodium PHP extension is loaded, we'll use it above any other solution.
- random_bytes() : string
- If the libsodium PHP extension is loaded, we'll use it above any other solution.
- random_bytes() : string
- Powered by ext/mcrypt (and thankfully NOT libmcrypt)
- random_int() : int
- Fetch a random integer between $min and $max inclusive
- getallheaders() : mixed
- Get all HTTP header key/values as an associative array for the current request.
- idn_to_ascii() : mixed
- idn_to_utf8() : mixed
- normalizer_is_normalized() : mixed
- normalizer_normalize() : mixed
- intdiv() : mixed
- preg_replace_callback_array() : mixed
- error_clear_last() : mixed
- sapi_windows_vt100_support() : mixed
- stream_isatty() : mixed
- utf8_encode() : mixed
- utf8_decode() : mixed
- spl_object_id() : mixed
- mb_ord() : mixed
- mb_chr() : mixed
- mb_scrub() : mixed
- get_api_payment_weixin_query() : mixed
- 微信订单查寻 在订单中要调用,用户检测是否支付成功 如果需要支付宝,那么要实现 get_api_payment_alipay_query
- payment_weixin_refund() : mixed
- 微信支付退款 如果需要支付宝,那么要实现 payment_alipay_refund
- payemnt_insert_base() : mixed
- 写入支付信息
- get_payment_base() : mixed
- 获取支付信息
- get_payment_base_by_id() : mixed
- 获取支付信息
- update_payment_base() : mixed
- 更新支付信息
- insert_payment_refund_info() : mixed
- 写入退款信息
- get_webtool_wx() : mixed
- add_webtool_cmd_job() : mixed
- create_oss_remote_url() : mixed
- add_oss_info() : mixed
- webtool_log() : mixed
- update_webtool_log() : mixed
- set_webtool_printer_finish() : mixed
- close_webtool_printer_job() : mixed
- get_captcha_drive() : mixed
- get_captcha_check() : mixed
- get_captcha_init() : mixed
- element() : mixed
- element_to_str() : mixed
- element_vue() : mixed
- element_open_pdf() : mixed
- element_open_office() : mixed
- predis() : mixed
- redis
- predis_add_geo() : mixed
- 添加位置信息 predis_add_geo('places',[ [ 'lng'=>'116.397128', 'lat'=>'39.916527', 'title'=>'北京天安门' ], ]);
- predis_delete_geo() : mixed
- 删除位置信息
- predis_get_pager() : mixed
- 返回附近的地理位置 pr(predis_get_pager('places', 116.403958, 39.915049)); http://redisdoc.com/geo/georadius.html
- predis_geo_pos() : mixed
- 取lat lng
- array_to_pager() : mixed
- 分组分页
- get_url_remove_http() : mixed
- 返回URL路径,不含有域名部分
- get_ext_by_url() : mixed
- 取后缀 add_action("get_ext_by_url",function(&$data){ $url = $data['url']; $data['ext'] = 'pdf'; });
- get_mime() : mixed
- 通过URL取mime
- get_mime_content() : mixed
- 取mime
- get_remote_file() : mixed
- 获取远程URL内容
- remove_host() : mixed
- 移除主域名部分
- download_file() : mixed
- 下载文件 建议使用 download_file_safe
- download_file_safe() : mixed
- 下载资源文件到本地
- download_remote_file() : mixed
- 下载远程文件 global $remote_to_local_path; $remote_to_local_path = '/uploads/saved/'.date("Y-m-d");
- curl_aliyun() : mixed
- 调用阿里云
- success_data() : mixed
- 返回成功的json信息
- error_data() : mixed
- 返回失败的json信息
- get_path_info() : mixed
- pathinfo /index.php/admin/auth/index?code=2 返回 admin/auth/index 数组时返回 ['admin','auth','index']
- router_pathinfo() : mixed
- 支持pathinfo路由 未找到请用 pathinfo_not_find 函数
- make_rand_code() : mixed
- 生成数字随机数 一般用于核销 需要表名 rand_code 字段 nid code status默认0
- update_make_rand_code() : mixed
- 核销后需要释放核销码
- set_lock() : mixed
- 锁功能已替代 lock_call('k',functon(){
- get_lock() : mixed
- 获取是否锁定
- del_lock() : mixed
- 释放锁定
- json_replace() : mixed
- json数据替换
- remove_php_notes() : mixed
- 去除PHP代码注释
- online_view_office() : mixed
- 在线查看office文件
- printfs() : mixed
- 格式化输出金额 强制输出数字类型
- float_noup() : mixed
- float不进位,如3.145 返回3.14 进位的有默认round(3.145) 或sprintf("%.2f",3.145);
- float_up() : mixed
- 四舍五入
- load_xls() : mixed
- 加载xlsx load_xls([ 'file' => $xls, 'config'=>[ '序号' =>'index', ], 'title_line'=>1, 'call'=>function($i,$row,&$d){} ]);
- get_lines() : mixed
- 获取文件行数,不包空行
- get_request_top() : mixed
- 返回请求中是http还是https
- get_request_host() : mixed
- 返回请求域名及URL部分,不包含http://
- auto_jump() : mixed
- 自动跳转到https网站
- get_http_full_url() : mixed
- get_index_array_valule() : mixed
- 从数组中搜索
- gbk_substr() : mixed
- get_gbk_len() : mixed
- GBK长宽 2个字符
- get_text_c() : mixed
- 文字居中
- get_text_lr() : mixed
- 文字排版 左 中 右 左 右
- allow_cross_origin() : mixed
- 处理跨域
- to_utf8() : mixed
- csv_reader() : mixed
- csv_writer() : mixed
- lock_call() : mixed
- 基于redis锁
- lock_start() : mixed
- 开始锁
- lock_end() : mixed
- 释放锁
- compare_date() : mixed
- redis_pub() : mixed
- 发布消息 redis_pub("demo","welcome man"); redis_pub("demo",['title'=>'yourname']);
- redis_sub() : mixed
- 取订阅消息 redis_sub("demo",function($channel,$message){ echo "channel ".$channel."\n"; print_r($message); });
- send_pusher() : mixed
- think_check_sign() : mixed
- think_create_sign() : mixed
- get_str_ord() : mixed
- gz_encode() : mixed
- gz_decode() : mixed
- html_to_pdf() : mixed
- get_barcode() : mixed
- https://github.com/picqer/php-barcode-generator/blob/main/src/BarcodeGenerator.php C128 C128A C128B C128C C93 EAN13 EAN8 EAN2
- text_add_br() : mixed
- get_server_headers() : mixed
- output_js_css() : mixed
- file_parse() : mixed
- 解析文件内容
- show_number() : mixed
- 优化数量显示 1.10显示为1.1 1.05显示为1.05 1.00显示为1
- get_str_number() : mixed
- 取字符中的数字
- line_bezier() : mixed
- 贝塞尔
- num_to_chinese() : mixed
- 数字转中文,非金额读法
- get_video_time() : mixed
- 获取本地音视频时长 https://github.com/JamesHeinrich/getID3 composer require james-heinrich/getid3
- copy_dir() : mixed
- 目录 复制到 另一个目录
- unzip_tar() : mixed
- 解压zip、7z、gz、tar、bz2包 yum -y install p7zip unar unzip
- think_exec() : mixed
- exec
- xml2array() : mixed
- _xml2array_node() : mixed
- array2xml() : mixed
- is_image_ext() : mixed
- 是否是图片
- is_video_ext() : mixed
- 是否是视频
- is_audio_ext() : mixed
- 是否是音频
- copy_base64_data() : mixed
- set_scss_path() : mixed
- scss() : mixed
- get_ws_js() : mixed
- HTML端收消息 wss://yourdomain/wss ws://ip:port
- create_node_ws_server() : mixed
- 生成node js ws服务 需要把返回的内容写入server.js中 依赖 ioredis
- xis_ssl() : mixed
- xcookie() : mixed
- xcookie_delete() : mixed
- rpc_client() : mixed
- rpc_server() : mixed
- rpc_token() : mixed
- call_retry() : mixed
- 尝试多次运行 $times 运行次数 $usleep_time 毫秒
- array_to_tree() : mixed
- 数组转tree
- pr() : mixed
- 数组或字符输出,方便查看
- add_action() : mixed
- do_action() : mixed
- is_cli() : mixed
- is_post() : mixed
- is_json() : mixed
- array_to_object() : mixed
- object_to_array() : mixed
- get_dir() : mixed
- get_ext() : mixed
- get_name() : mixed
- create_dir_if_not_exists() : mixed
- is_local() : mixed
- get_ip() : mixed
- now() : mixed
- get_distance() : mixed
- get_deep_dir() : mixed
- price_format() : mixed
- json() : mixed
- json_error() : mixed
- json_success() : mixed
- yaml_load() : mixed
- yaml_dump() : mixed
- yaml() : mixed
- aes_encode() : mixed
- aes_decode() : mixed
- string_to_array() : mixed
- get_dates() : mixed
- get_date_china() : mixed
- timeago() : mixed
- is_ajax() : mixed
- import() : mixed
- get_reffer() : mixed
- get_root_domain() : mixed
- get_sub_domain() : mixed
- sign_by_secret() : mixed
- zip_extract() : mixed
- zip_create() : mixed
- is_json_request() : mixed
- array_to_el_select() : mixed
- echats() : mixed
- echats_reload() : mixed
- echarts() : mixed
- echarts_reload() : mixed
- set_field_allow() : mixed
- 设置允许字段
- get_field_allow() : mixed
- 获取允许字段
- get_data_allow() : mixed
- 返回允许字段值
- is_ssl() : mixed
- think_validate() : mixed
- validate() : mixed
- jump() : mixed
- set_url_use_cdn() : mixed
- 对数组添加cdn url
- push_task() : mixed
- 添加到队列 "topthink/think-queue": "^3" push_task('app\printer\job\Printer',['tt'=>11],'');
- loop_tree() : mixed
- 向上取递归 如当前分类是3,将返回 123所有的值 $arr = loop_tree("catalog",$v['catalog_id'],true); foreach($arr as $vv){ $title[] = $vv['title']; } id pid 1 0 2 1 3 2
- get_loop_tree_ids() : mixed
- 向下递归
- loop_del() : mixed
- 递归删除
- el_table_tree() : mixed
- 用于tree表格排序 因为tree给的lists字段是用于显示,在排序时得到的index是不正确的, 此时需要lists_sort字段得到正确的index 在交换排序值时才能正确保存并显示
- el_cascader() : mixed
- 用于cascader字段 public function cascader(){ $catalog = db_get($this->table,"*",[ 'ORDER'=>catalog_default_order_by(), 'status'=>1 ]); $select = el_cascader(array_to_tree($catalog)); json_success(['data'=>$select]); } $catalog = db_get("catalog",[]); $select = el_cascader(array_to_tree($catalog));
- _loop_del_tree() : mixed
- 内部实现
- _loop_tree_deep_inner() : mixed
- 内部实现
- get_xss_clean_ins() : mixed
- xss_clean_str() : mixed
- xss_clean() : mixed
- global_trim() : mixed
- global_trim_inner() : mixed
- get() : mixed
- get_req_post() : mixed
- g() : mixed
- get_input() : mixed
- guzzle_http() : mixed
- guzzle_http_fake_option() : mixed
- get_template() : mixed
- get_api_data() : mixed
- 获取接口请求数据,如果存在将不发起接口请求
- api_data_insert() : mixed
- 记录接口请求数据
- cookie() : mixed
- cookie_delete() : mixed
- get_env() : mixed
- 获取ENV
- set_env() : mixed
- 设置ENV
- set_config() : mixed
- get_config() : mixed
- get_id_by_auto_insert() : mixed
- 设置或取ID
- get_all_or_one() : mixed
- 取一条或多条记录 get_all_or_one("novel_book",$where,'get_novel_book_row');
- db_set_field_type() : mixed
- db_reset_data_by_filed_type() : mixed
- 权限字段类型设置值
- db_active() : mixed
- 激活数据库连接
- db_active_default() : mixed
- 使用默认monogo连接
- db_get_group() : mixed
- group by 查寻
- _db_group_con() : mixed
- mongodb groupby兼容
- db_update() : mixed
- 数据库更新记录
- db_del() : mixed
- 数据库删除记录
- db_insert() : mixed
- 向数据库添加记录
- _db_get_when_array() : mixed
- 内部调用,处理 where条件是数组的情况
- db_get_one() : mixed
- 数据库查寻
- set_db_cache() : mixed
- 设置数据库查寻字段走缓存
- get_db_cache_key() : mixed
- 取缓存key
- get_db_cache_where() : mixed
- 取缓存where
- db_get_cache() : mixed
- 取数据,带缓存
- db_get() : mixed
- 取数据
- db_get_count() : mixed
- 数量
- db_get_sum() : mixed
- 计算SUM
- db_pager() : mixed
- 数据库分页
- db_get_pager() : mixed
- 分页
- db_action() : mixed
- mongodb事务
- mongo_action() : mixed
- db_allow() : mixed
- 数据库字段允许
- db_allow_set() : mixed
- 设置允许字段
- vue_get_jidu() : mixed
- 季度 返回 k=>{0:开始 1:结束 flag:}
- vue_get_jidu_array() : mixed
- 每个季度开始、结束时间
- vue_get_last_day() : mixed
- 某月的最后一天
- vue_message() : mixed
- vue message
- vue_loading() : mixed
- loading效果
- vue_el_table_drag() : mixed
- <el-table class="draggable_video"></el-table>
- php_to_js() : string
- Encodes a PHP variable into javascript representation.
- yii_quote() : mixed
Constants
APP_FORM_PATH
public
mixed
APP_FORM_PATH
= \VEN_ELEMENT_FORM_PATH
DS
public
mixed
DS
= \DIRECTORY_SEPARATOR
HELPER_DIR
public
mixed
HELPER_DIR
= __DIR__
IDNA_ALLOW_UNASSIGNED
public
mixed
IDNA_ALLOW_UNASSIGNED
= 1
IDNA_CHECK_BIDI
public
mixed
IDNA_CHECK_BIDI
= 4
IDNA_CHECK_CONTEXTJ
public
mixed
IDNA_CHECK_CONTEXTJ
= 8
IDNA_DEFAULT
public
mixed
IDNA_DEFAULT
= 0
IDNA_ERROR_BIDI
public
mixed
IDNA_ERROR_BIDI
= 2048
IDNA_ERROR_CONTEXTJ
public
mixed
IDNA_ERROR_CONTEXTJ
= 4096
IDNA_ERROR_DISALLOWED
public
mixed
IDNA_ERROR_DISALLOWED
= 128
IDNA_ERROR_DOMAIN_NAME_TOO_LONG
public
mixed
IDNA_ERROR_DOMAIN_NAME_TOO_LONG
= 4
IDNA_ERROR_EMPTY_LABEL
public
mixed
IDNA_ERROR_EMPTY_LABEL
= 1
IDNA_ERROR_HYPHEN_3_4
public
mixed
IDNA_ERROR_HYPHEN_3_4
= 32
IDNA_ERROR_INVALID_ACE_LABEL
public
mixed
IDNA_ERROR_INVALID_ACE_LABEL
= 1024
IDNA_ERROR_LABEL_HAS_DOT
public
mixed
IDNA_ERROR_LABEL_HAS_DOT
= 512
IDNA_ERROR_LABEL_TOO_LONG
public
mixed
IDNA_ERROR_LABEL_TOO_LONG
= 2
IDNA_ERROR_LEADING_COMBINING_MARK
public
mixed
IDNA_ERROR_LEADING_COMBINING_MARK
= 64
IDNA_ERROR_LEADING_HYPHEN
public
mixed
IDNA_ERROR_LEADING_HYPHEN
= 8
IDNA_ERROR_PUNYCODE
public
mixed
IDNA_ERROR_PUNYCODE
= 256
IDNA_ERROR_TRAILING_HYPHEN
public
mixed
IDNA_ERROR_TRAILING_HYPHEN
= 16
IDNA_NONTRANSITIONAL_TO_ASCII
public
mixed
IDNA_NONTRANSITIONAL_TO_ASCII
= 16
IDNA_NONTRANSITIONAL_TO_UNICODE
public
mixed
IDNA_NONTRANSITIONAL_TO_UNICODE
= 32
IDNA_USE_STD3_RULES
public
mixed
IDNA_USE_STD3_RULES
= 2
INTL_IDNA_VARIANT_2003
public
mixed
INTL_IDNA_VARIANT_2003
= 0
INTL_IDNA_VARIANT_UTS46
public
mixed
INTL_IDNA_VARIANT_UTS46
= 1
PHP_FLOAT_DIG
public
mixed
PHP_FLOAT_DIG
= 15
PHP_FLOAT_EPSILON
public
mixed
PHP_FLOAT_EPSILON
= 2.2204460492503E-16
PHP_FLOAT_MAX
public
mixed
PHP_FLOAT_MAX
= 1.7976931348623157E+308
PHP_FLOAT_MIN
public
mixed
PHP_FLOAT_MIN
= 2.2250738585072E-308
PHP_INT_MIN
public
mixed
PHP_INT_MIN
= ~\PHP_INT_MAX
PHP_OS_FAMILY
public
mixed
PHP_OS_FAMILY
= \Symfony\Polyfill\Php72\Php72::php_os_family()
PHP_VERSION_ID
public
mixed
PHP_VERSION_ID
= $RandomCompatversion[0] * 10000 + $RandomCompatversion[1] * 100 + $RandomCompatversion[2]
RANDOM_COMPAT_READ_BUFFER
public
mixed
RANDOM_COMPAT_READ_BUFFER
= 8
RANDOM_COMPAT_READ_BUFFER
public
mixed
RANDOM_COMPAT_READ_BUFFER
= 8
thefunpower_mongo_dir
public
mixed
thefunpower_mongo_dir
= __DIR__
U_IDNA_ACE_PREFIX_ERROR
public
mixed
U_IDNA_ACE_PREFIX_ERROR
= 66564
U_IDNA_CHECK_BIDI_ERROR
public
mixed
U_IDNA_CHECK_BIDI_ERROR
= 66562
U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR
public
mixed
U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR
= 66568
U_IDNA_ERROR_LIMIT
public
mixed
U_IDNA_ERROR_LIMIT
= 66569
U_IDNA_ERROR_START
public
mixed
U_IDNA_ERROR_START
= 66560
U_IDNA_LABEL_TOO_LONG_ERROR
public
mixed
U_IDNA_LABEL_TOO_LONG_ERROR
= 66566
U_IDNA_PROHIBITED_ERROR
public
mixed
U_IDNA_PROHIBITED_ERROR
= 66560
U_IDNA_STD3_ASCII_RULES_ERROR
public
mixed
U_IDNA_STD3_ASCII_RULES_ERROR
= 66563
U_IDNA_UNASSIGNED_ERROR
public
mixed
U_IDNA_UNASSIGNED_ERROR
= 66561
U_IDNA_VERIFICATION_ERROR
public
mixed
U_IDNA_VERIFICATION_ERROR
= 66565
U_IDNA_ZERO_LENGTH_LABEL_ERROR
public
mixed
U_IDNA_ZERO_LENGTH_LABEL_ERROR
= 66567
U_STRINGPREP_CHECK_BIDI_ERROR
public
mixed
U_STRINGPREP_CHECK_BIDI_ERROR
= 66562
U_STRINGPREP_PROHIBITED_ERROR
public
mixed
U_STRINGPREP_PROHIBITED_ERROR
= 66560
U_STRINGPREP_UNASSIGNED_ERROR
public
mixed
U_STRINGPREP_UNASSIGNED_ERROR
= 66561
VEN_ELEMENT_FORM_PATH
public
mixed
VEN_ELEMENT_FORM_PATH
= __DIR__ . '/form'
Functions
in_api()
判断在api接口中
in_api() : mixed
get_app_header()
取header
get_app_header([mixed $name = '' ]) : mixed
Parameters
- $name : mixed = ''
is_app_req()
使用header判断是app接口请求
is_app_req() : mixed
get_m_c_a()
取模块、控制器、动作
get_m_c_a() : mixed
get_module_list()
模块列表
get_module_list() : mixed
has_module()
是否存在模块
has_module(mixed $name) : mixed
Parameters
- $name : mixed
is_app_api_req()
是否是api控制器请求
is_app_api_req() : mixed
index_url()
index_url().'/scrm/site/index' 配置 index_url 如 $config['index_url'] = 'index.php';
index_url() : mixed
set_menu_group()
set_menu_group(mixed $name, mixed $arr[, mixed $level = 1 ]) : mixed
Parameters
- $name : mixed
- $arr : mixed
- $level : mixed = 1
get_login_cid()
获取unipush的cid 用于推送
get_login_cid(mixed $user_id) : mixed
Parameters
- $user_id : mixed
create_user_by_openid()
用openid创建帐号
create_user_by_openid(mixed $openid[, mixed $type = 'weixin' ]) : mixed
Parameters
- $openid : mixed
- $type : mixed = 'weixin'
get_user_by_phone()
根据手机号获取帐号,如不存在支持创建帐号
get_user_by_phone(mixed $phone[, mixed $create_if_not_find = false ][, mixed $openid = '' ]) : mixed
Parameters
- $phone : mixed
- $create_if_not_find : mixed = false
- $openid : mixed = ''
set_user_token()
获取手机号后设置token
set_user_token(mixed $one) : mixed
Parameters
- $one : mixed
set_user_openid()
记录用户的openid
set_user_openid(mixed $openid[, mixed $data = [] ][, mixed $type = 'weixin' ]) : mixed
Parameters
- $openid : mixed
- $data : mixed = []
- $type : mixed = 'weixin'
get_user_openid()
取用户OPENID
get_user_openid(mixed $openid[, mixed $type = 'weixin' ]) : mixed
Parameters
- $openid : mixed
- $type : mixed = 'weixin'
get_user_avatar_url()
处理用户头像、昵称
get_user_avatar_url(mixed &$user) : mixed
Parameters
- $user : mixed
get_comment_status()
get_comment_status() : mixed
get_comment_status_color()
get_comment_status_color() : mixed
get_comment()
取一条评论信息
get_comment(mixed $id) : mixed
Parameters
- $id : mixed
get_comments()
获取评论
get_comments(mixed $type[, mixed $where = [] ]) : mixed
Parameters
- $type : mixed
- $where : mixed = []
get_comment_row()
comment row
get_comment_row(mixed &$v) : mixed
Parameters
- $v : mixed
add_comment()
添加评论
add_comment(mixed $type[, mixed $arr = [] ][, mixed $response_json = false ]) : mixed
Parameters
- $type : mixed
- $arr : mixed = []
- $response_json : mixed = false
update_comment()
更新评论
update_comment(mixed $id[, mixed $where = [] ][, mixed $update_data = [] ][, mixed $response_json = false ]) : mixed
Parameters
- $id : mixed
- $where : mixed = []
- $update_data : mixed = []
- $response_json : mixed = false
get_media_by_url()
取资源信息
get_media_by_url(mixed $url) : mixed
Parameters
- $url : mixed
applet_image_init()
https://image.intervention.io/v2/introduction/installation
applet_image_init() : mixed
get_notify()
获取提醒
get_notify(mixed $user_id, mixed $type) : mixed
Parameters
- $user_id : mixed
- $type : mixed
read_notify()
已读
read_notify(mixed $user_id, mixed $type[, mixed $id = '' ]) : mixed
Parameters
- $user_id : mixed
- $type : mixed
- $id : mixed = ''
get_notify_count()
获取未读数量
get_notify_count(mixed $user_id, mixed $type) : mixed
Parameters
- $user_id : mixed
- $type : mixed
add_notify()
添加提醒
add_notify(mixed $user_id, mixed $type, mixed $title, mixed $body[, mixed $par = [] ]) : mixed
Parameters
- $user_id : mixed
- $type : mixed
- $title : mixed
- $body : mixed
- $par : mixed = []
applet_image_resize()
图片缩放
applet_image_resize(mixed $url[, mixed $w = '' ][, mixed $h = '' ][, mixed $result_local = false ]) : mixed
Parameters
- $url : mixed
- $w : mixed = ''
- $h : mixed = ''
- $result_local : mixed = false
applet_create_qr()
生成二维码 content title logo name brower 其中 brower=>1时不生成文件 applet_create_qr([ 'title'=>'', 'content'=>'', 'brower'=>1, 'size'=>100, //不用CDN地址,直接返回本地相对地址 'no_cdn'=>1, ]);
applet_create_qr([mixed $arr = [] ][, mixed $dir_name = '' ]) : mixed
Parameters
- $arr : mixed = []
- $dir_name : mixed = ''
get_rand_jp()
用户抽奖 $prize_arr = array( array('node_id'=>1,'prize'=>'平板电脑','v'=>10,'num'=>3), array('node_id'=>2,'prize'=>'数码相机','v'=>10,'num'=>1), ); $nid = 1; pr(get_rand_jp(100,$nid,$prize_arr));
get_rand_jp(mixed $user_id, mixed $nid, mixed $jp_arr) : mixed
Parameters
- $user_id : mixed
- $nid : mixed
- $jp_arr : mixed
_get_rand_jp()
_get_rand_jp(mixed $arr) : mixed
Parameters
- $arr : mixed
get_pf_amount()
平分金额
get_pf_amount(mixed $amount, mixed $num) : mixed
Parameters
- $amount : mixed
- $num : mixed
get_rand_amount()
随机金额
get_rand_amount(mixed $amount, mixed $num[, mixed $is_frist = true ]) : mixed
Parameters
- $amount : mixed
- $num : mixed
- $is_frist : mixed = true
applet_qr_parse()
applet_qr_parse(mixed $input) : mixed
Parameters
- $input : mixed
applet_barcode()
条形码 composer require picqer/php-barcode-generator
applet_barcode(mixed $code) : mixed
Parameters
- $code : mixed
applet_check_captch_tencent()
腾讯云验证码
applet_check_captch_tencent() : mixed
applet_use_captch_tencent()
applet_use_captch_tencent() : mixed
get_phone_send_vue()
VUE 验证 腾讯验证码或者图形验证码
get_phone_send_vue([mixed $opt = [] ]) : mixed
Parameters
- $opt : mixed = []
get_phone_send_form()
get_phone_send_form() : mixed
get_blog_status()
get_blog_status() : mixed
get_blog_status_color()
get_blog_status_color() : mixed
get_blog()
get_blog(mixed $id) : mixed
Parameters
- $id : mixed
get_blog_row()
get_blog_row(mixed &$v) : mixed
Parameters
- $v : mixed
get_like_pager()
get_like_pager(mixed $user_id) : mixed
Parameters
- $user_id : mixed
get_like_blog()
是否是我喜欢的 当user_id为空,且limit>1时,返回blog被喜欢的数组
get_like_blog(mixed $blog_id[, mixed $user_id = '' ][, mixed $limit = 1 ]) : mixed
Parameters
- $blog_id : mixed
- $user_id : mixed = ''
- $limit : mixed = 1
get_like_blog_pager()
对动态点赞的会员
get_like_blog_pager(mixed $blog_id) : mixed
Parameters
- $blog_id : mixed
get_like_blog_count()
喜欢数量
get_like_blog_count(mixed $blog_id) : mixed
Parameters
- $blog_id : mixed
like_blog()
喜欢或取消喜欢
like_blog(mixed $blog_id, mixed $user_id) : mixed
Parameters
- $blog_id : mixed
- $user_id : mixed
get_follow_blog_count()
关注数量
get_follow_blog_count(mixed $user_id) : mixed
Parameters
- $user_id : mixed
get_blog_follow_user()
就否关注
get_blog_follow_user(mixed $user_id, mixed $my_user_id) : mixed
Parameters
- $user_id : mixed
- $my_user_id : mixed
follow_blog()
关注
follow_blog(mixed $user_id, mixed $my_user_id) : mixed
Parameters
- $user_id : mixed
- $my_user_id : mixed
blog_antiporn()
文本+图片审核
blog_antiporn(mixed $content[, mixed $images = [] ]) : mixed
Parameters
- $content : mixed
- $images : mixed = []
del_node()
删除node
del_node(mixed $cck_name, mixed $where) : mixed
Parameters
- $cck_name : mixed
- $where : mixed
get_nodes()
多条记录
get_nodes(mixed $cck_name, mixed $where) : mixed
Parameters
- $cck_name : mixed
- $where : mixed
get_node()
一条记录
get_node(mixed $cck_name, mixed $where) : mixed
Parameters
- $cck_name : mixed
- $where : mixed
get_cck_field()
get_cck_field(mixed $cck_name) : mixed
Parameters
- $cck_name : mixed
get_cck_field_by_builder()
get_cck_field_by_builder(mixed $builder) : mixed
Parameters
- $builder : mixed
update_node()
强制更新数据
update_node(mixed $cck_name, mixed $data, mixed $where) : mixed
Parameters
- $cck_name : mixed
- $data : mixed
- $where : mixed
save_node()
保存node
save_node(mixed $cck_name, mixed $input[, mixed $ret_json = false ]) : mixed
Parameters
- $cck_name : mixed
- $input : mixed
- $ret_json : mixed = false
get_node_more_field()
追回其他字段
get_node_more_field(mixed &$field) : mixed
Parameters
- $field : mixed
get_node_data_filter()
数据处理
get_node_data_filter(mixed $cck_name, mixed $input) : mixed
Parameters
- $cck_name : mixed
- $input : mixed
get_node_pager()
cck分页
get_node_pager(mixed $cck_name[, mixed $where = [] ][, mixed $input = '' ]) : mixed
Parameters
- $cck_name : mixed
- $where : mixed = []
- $input : mixed = ''
get_node_tree()
cck tree
get_node_tree(mixed $cck_name[, mixed $where = [] ][, mixed $input = '' ]) : mixed
Parameters
- $cck_name : mixed
- $where : mixed = []
- $input : mixed = ''
get_cck_table()
node 表名 ,添加 node_
get_cck_table(mixed $cck_name) : mixed
Parameters
- $cck_name : mixed
remove_cck_table()
node 表名,移除node_
remove_cck_table(mixed $cck_name) : mixed
Parameters
- $cck_name : mixed
get_init_cck()
cck init
get_init_cck(mixed $cck_name) : mixed
Parameters
- $cck_name : mixed
get_node_where()
分页、列表统一处理where
get_node_where(mixed $builder, mixed &$where) : mixed
Parameters
- $builder : mixed
- $where : mixed
get_cck_author_where()
仅操作自己
get_cck_author_where(mixed $cck_name, mixed &$where[, mixed $auth_type = 'auth_view' ]) : mixed
Parameters
- $cck_name : mixed
- $where : mixed
- $auth_type : mixed = 'auth_view'
form_builder_field()
$filed = form_builder_field('fn or name',$old_field); set_field_allow('scrm_customer',$field);
form_builder_field(mixed $name, mixed $old_field) : mixed
Parameters
- $name : mixed
- $old_field : mixed
form_builder()
构建表单 使用 /form/builder
form_builder(mixed $name[, mixed $ret_allow_field = false ]) : mixed
Parameters
- $name : mixed
- $ret_allow_field : mixed = false
form_create()
form_create(mixed $arr) : mixed
Parameters
- $arr : mixed
form_field_type()
builder 字段
form_field_type() : mixed
merge_form_field()
合并原字段及自定义字段
merge_form_field([mixed $field = [] ][, mixed $form = [] ]) : mixed
Parameters
- $field : mixed = []
- $form : mixed = []
get_city_area()
省市区 由命令行 php think get_city --ansi 生成
get_city_area() : mixed
form_get_city()
同 get_city_area()
form_get_city() : mixed
__()
think_validate https://github.com/vlucas/valitron
__(mixed $str) : mixed
Parameters
- $str : mixed
cache()
缓存 加前缀 CACHE_PRE
cache([string $name = null ][, mixed $value = '' ][, mixed $options = null ][, mixed $tag = null ]) : mixed
Parameters
- $name : string = null
- $value : mixed = ''
- $options : mixed = null
- $tag : mixed = null
table_sortable()
table_sortable(mixed $id, mixed $vue_method) : mixed
Parameters
- $id : mixed
- $vue_method : mixed
host()
host() : mixed
is_admin()
判断是超管
is_admin([mixed $user_id = '' ]) : mixed
Parameters
- $user_id : mixed = ''
is_admin_login()
判断是普通管理员
is_admin_login() : mixed
get_admin_user()
取管理员信息
get_admin_user([mixed $user_id = '' ]) : mixed
Parameters
- $user_id : mixed = ''
get_user()
取用户信息
get_user([mixed $user_id = '' ]) : mixed
Parameters
- $user_id : mixed = ''
admin_header()
admin_header() : mixed
admin_footer()
admin_footer() : mixed
admin_access_to_yunyin()
管理员权限同步给运营
admin_access_to_yunyin([mixed $allow = [] ]) : mixed
admin_access_to_yunyin([ 'replenish', ]); add_admin_access('缺货补货.replenish',[ '查看.view', '编辑.edit', '管理.admin', 'url'=>'selling_machine/replenish' ],100);
Parameters
- $allow : mixed = []
admin_access()
管理员权限
admin_access(mixed $name[, mixed $user_id = '' ]) : mixed
Parameters
- $name : mixed
- $user_id : mixed = ''
add_admin_access()
add_admin_access(mixed $key[, mixed $array = [] ][, mixed $level = 0 ]) : mixed
Parameters
- $key : mixed
- $array : mixed = []
- $level : mixed = 0
get_admin_access_table()
get_admin_access_table() : mixed
get_admin_access()
get_admin_access() : mixed
get_admin_access_menu()
get_admin_access_menu([mixed $user_id = '' ]) : mixed
Parameters
- $user_id : mixed = ''
think_vue_media_button()
think_vue_media_button([mixed $name = 'images' ][, mixed $top = 'form' ][, mixed $image_click = '' ]) : mixed
Parameters
- $name : mixed = 'images'
- $top : mixed = 'form'
- $image_click : mixed = ''
think_vue_media_one_button()
think_vue_media_one_button([mixed $name = 'images' ][, mixed $top = 'form' ][, mixed $show_del = false ]) : mixed
Parameters
- $name : mixed = 'images'
- $top : mixed = 'form'
- $show_del : mixed = false
think_vue_media()
think_vue_media(mixed &$vue[, mixed $js = "this.$set(this.form,'image',v);" ][, mixed $check_js = '' ]) : mixed
Parameters
- $vue : mixed
- $js : mixed = "this.$set(this.form,'image',v);"
- $check_js : mixed = ''
app_boot()
app_boot() : mixed
order_num()
order_num() : mixed
insert_trace()
记录日志
insert_trace([mixed $arr = [] ][, mixed $type = 'order' ]) : mixed
Parameters
- $arr : mixed = []
- $type : mixed = 'order'
get_trace()
获取操作记录
get_trace([mixed $type = 'order' ][, mixed $where = [] ]) : mixed
Parameters
- $type : mixed = 'order'
- $where : mixed = []
star_phone()
手机号显示 ****
star_phone(mixed $phone) : mixed
Parameters
- $phone : mixed
vue_add_media_muit()
多图上传
vue_add_media_muit([mixed $form = 'form.images' ]) : mixed
Parameters
- $form : mixed = 'form.images'
vue_add_media()
单图上传
vue_add_media([mixed $form = 'form.images' ]) : mixed
Parameters
- $form : mixed = 'form.images'
rpc_server_auth()
检测RPC服务是否可用 $client = rpc_client($url); $info = $client->get_info([ 'device_id'=>'', 'device_key'=>'', ]);
rpc_server_auth() : mixed
rpc()
调用远程RPC服务,如果远程的应用模块需要放在本地,可以把远程的模块复制到本项目下。 然后把数据库中对应的RPC URL删除,不需要改动其他代码,就可以不发起远程调用,而直接调用本地函数
rpc(mixed $url) : mixed
Parameters
- $url : mixed
format_money()
格式化数字 因mongodb对字段类型要求严格
format_money(mixed $money) : mixed
Parameters
- $money : mixed
rand_password()
生成安全的随机密码函数
rand_password([mixed $length = 12 ]) : mixed
Parameters
- $length : mixed = 12
view()
view
view([string $template = '' ][, mixed $vars = [] ]) : mixed
Parameters
- $template : string = ''
- $vars : mixed = []
common_init()
初始化RPC请求参数及Redis
common_init() : mixed
get_allow_mime()
获取允许上传的mime
get_allow_mime() : mixed
file_upload_button()
文件上传 不同于图片上传,文件上传仅支持点击按钮直接上传,不支持从文件库中选择文件
file_upload_button(mixed $label[, mixed $method = 'file_upload_success' ][, mixed $accept = '' ][, mixed $is_multiple = false ][, mixed $url = '/admin/media/upload' ]) : mixed
file_upload_button('重新上传','file_upload_success','pdf')
$vue->method("file_upload_success(res, file, fileList)"," if(res.data[0]){ _this.$message.success('上传成功'); _this.form.file = res.data[0]; }else{ _this.$message.error('操作异常'); } ");
Parameters
- $label : mixed
- $method : mixed = 'file_upload_success'
- $accept : mixed = ''
- $is_multiple : mixed = false
- $url : mixed = '/admin/media/upload'
google_authenticator()
GOOGLE验证器 验证
google_authenticator(mixed $google_captcha, mixed $user) : mixed
Parameters
- $google_captcha : mixed
- $user : mixed
google_authenticator_create()
GOOGLE验证器 生成secret
google_authenticator_create(mixed $name[, mixed $title = null ]) : mixed
Parameters
- $name : mixed
- $title : mixed = null
set_record()
记录
set_record(mixed $type[, mixed $data = [] ]) : mixed
Parameters
- $type : mixed
- $data : mixed = []
get_record()
获取记录
get_record(mixed $type[, mixed $where = [] ]) : mixed
Parameters
- $type : mixed
- $where : mixed = []
load_app_php()
加载 app/目录/app.php文件
load_app_php() : mixed
load_hook_php()
加载 hook/目录/hook.php文件
load_hook_php() : mixed
get_node_fav_is()
处理常用的主题收藏等类似操作。 是否收藏
get_node_fav_is(mixed $nid, mixed $user_id[, mixed $type = 'default' ]) : mixed
Parameters
- $nid : mixed
- $user_id : mixed
- $type : mixed = 'default'
get_node_favs()
收藏列表
get_node_favs(mixed $user_id[, mixed $type = 'default' ]) : mixed
Parameters
- $user_id : mixed
- $type : mixed = 'default'
get_node_fav_count()
主题 收藏数量
get_node_fav_count(mixed $nid[, mixed $type = 'default' ]) : mixed
Parameters
- $nid : mixed
- $type : mixed = 'default'
set_node_fav()
收藏或取消收藏
set_node_fav(mixed $nid, mixed $user_id[, mixed $type = 'default' ]) : mixed
Parameters
- $nid : mixed
- $user_id : mixed
- $type : mixed = 'default'
get_user_tag()
get_user_tag([mixed $user_id = '' ]) : mixed
Parameters
- $user_id : mixed = ''
cdn_url()
cdn_url() : mixed
add_cdn_url()
设置CDN # CDN 激活 active_cdn = 1 # CDN 地址 支持以,分隔 CDN_URL = https://mac1.qihetaiji.com,https://mac.qihetaiji.com
add_cdn_url(mixed $url[, mixed $resize = '' ]) : mixed
Parameters
- $url : mixed
- $resize : mixed = ''
get_admin_tag()
get_admin_tag() : mixed
llc_encode()
使用公钥加密
llc_encode(mixed $data) : mixed
pr(llc_encode([ 'url'=>'xda.icu', 'exp_title'=>'永久', 'exp_time'=>'9999-12-31', ]));
Parameters
- $data : mixed
llc_decode()
使用私钥解密 用户只保留了私钥。
llc_decode([mixed $data = '' ]) : mixed
Parameters
- $data : mixed = ''
llc_powerby()
llc_powerby() : mixed
mp_jieba()
分词
mp_jieba(mixed $text) : mixed
Parameters
- $text : mixed
mp_init()
mp_init() : mixed
get_mp_config()
get_mp_config() : mixed
mp_create_qr()
二维码 QR_SCENE 临时二维码 QR_LIMIT_SCENE永久二维码
mp_create_qr(mixed $scene_code[, mixed $action_name = 'QR_LIMIT_SCENE' ]) : mixed
Parameters
- $scene_code : mixed
- $action_name : mixed = 'QR_LIMIT_SCENE'
mp_get_user_info()
获取用户基本信息(UnionID机制) https://developers.weixin.qq.com/doc/offiaccount/User_Management/Get_users_basic_information_UnionID.html#UinonId openid、subscribe、unionid、qr_scene、qr_scene_str subscribe 1已关注
mp_get_user_info(mixed $openid) : mixed
Parameters
- $openid : mixed
get_oauth2_wps_title()
get_oauth2_wps_title(mixed $url) : mixed
Parameters
- $url : mixed
get_oauth2_page_header()
get_oauth2_page_header([mixed $title = '' ]) : mixed
Parameters
- $title : mixed = ''
get_oauth2_page_footer()
get_oauth2_page_footer() : mixed
publish_oauth2_img()
publish_oauth2_img() : mixed
get_oauth2_access_token()
get_oauth2_access_token([mixed $where = [] ]) : mixed
Parameters
- $where : mixed = []
get_oauth2_access_token_by_state()
get_oauth2_access_token_by_state([mixed $state = 'weixin:' ]) : mixed
Parameters
- $state : mixed = 'weixin:'
MyXpanfileprecreate()
MyXpanfileprecreate() : bool|Fileprecreateresponse
Return values
bool|FileprecreateresponseMyPcssuperfile2()
MyPcssuperfile2(mixed $uplodidTmp) : mixed
Parameters
- $uplodidTmp : mixed
MyXpanfilecreate()
MyXpanfilecreate(mixed $uplodidTmp) : mixed
Parameters
- $uplodidTmp : mixed
fileupload()
fileupload() : mixed
filemeta()
filemeta() : mixed
MyXpanfileimagelist()
MyXpanfileimagelist() : mixed
MyXpanfiledoclist()
MyXpanfiledoclist() : mixed
MyXpanfilesearch()
MyXpanfilesearch() : mixed
MyXpanfilelist()
MyXpanfilelist() : mixed
userinfo()
userinfo() : mixed
MyApiQuota()
MyApiQuota() : mixed
MyXpannasuinfo()
MyXpannasuinfo() : mixed
multimediafile()
multimediafile() : mixed
MyXpanmultimediafilemetas()
MyXpanmultimediafilemetas() : mixed
MyXpanfilelistall()
MyXpanfilelistall() : mixed
auth()
auth() : mixed
MyOauthTokenAuthorizationCode()
MyOauthTokenAuthorizationCode() : bool|OauthTokenAuthorizationCodeResponse
Return values
bool|OauthTokenAuthorizationCodeResponseMyOauthTokenRefreshToken()
MyOauthTokenRefreshToken(mixed $rToken) : mixed
Parameters
- $rToken : mixed
MyOauthTokenDeviceCode()
MyOauthTokenDeviceCode() : mixed
MyOauthTokenDeviceToken()
MyOauthTokenDeviceToken(mixed $codeTmp) : mixed
Parameters
- $codeTmp : mixed
filemanager()
filemanager() : mixed
MyFilemanagercopy()
MyFilemanagercopy() : mixed
MyFilemanagermove()
MyFilemanagermove() : mixed
MyFilemanagerrename()
MyFilemanagerrename() : mixed
MyFilemanagerdelete()
MyFilemanagerdelete() : mixed
composerRequire5f0a856db0eb13be86d63b013a8d9e03()
composerRequire5f0a856db0eb13be86d63b013a8d9e03(string $fileIdentifier, string $file) : void
Parameters
- $fileIdentifier : string
- $file : string
RandomCompat_strlen()
strlen() implementation that isn't brittle to mbstring.func_overload
RandomCompat_strlen(string $binary_string) : int
This version just used the default strlen()
Parameters
- $binary_string : string
Tags
Return values
intRandomCompat_substr()
substr() implementation that isn't brittle to mbstring.func_overload
RandomCompat_substr(string $binary_string, int $start[, int|null $length = null ]) : string
This version just uses the default substr()
Parameters
- $binary_string : string
- $start : int
- $length : int|null = null
-
(optional)
Tags
Return values
stringRandomCompat_intval()
Cast to an integer if we can, safely.
RandomCompat_intval(int|float $number[, bool $fail_open = false ]) : float|int
If you pass it a float in the range (~PHP_INT_MAX, PHP_INT_MAX) (non-inclusive), it will sanely cast it to an int. If you it's equal to ~PHP_INT_MAX or PHP_INT_MAX, we let it fail as not an integer. Floats lose precision, so the <= and => operators might accidentally let a float through.
Parameters
- $number : int|float
-
The number we want to convert to an int
- $fail_open : bool = false
-
Set to true to not throw an exception
Tags
Return values
float|intrandom_bytes()
We don't have any more options, so let's throw an exception right now and hope the developer won't let it fail silently.
random_bytes(mixed $length) : string
Parameters
- $length : mixed
Tags
Return values
stringrandom_bytes()
Windows with PHP < 5.3.0 will not have the function openssl_random_pseudo_bytes() available, so let's use CAPICOM to work around this deficiency.
random_bytes(int $bytes) : string
Parameters
- $bytes : int
Tags
Return values
stringrandom_bytes()
Unless open_basedir is enabled, use /dev/urandom for random numbers in accordance with best practices
random_bytes(int $bytes) : string
Why we use /dev/urandom and not /dev/random
Parameters
- $bytes : int
Tags
Return values
stringrandom_bytes()
If the libsodium PHP extension is loaded, we'll use it above any other solution.
random_bytes(int $bytes) : string
libsodium-php project:
Parameters
- $bytes : int
Tags
Return values
stringrandom_bytes()
If the libsodium PHP extension is loaded, we'll use it above any other solution.
random_bytes(int $bytes) : string
libsodium-php project:
Parameters
- $bytes : int
Tags
Return values
stringrandom_bytes()
Powered by ext/mcrypt (and thankfully NOT libmcrypt)
random_bytes(int $bytes) : string
Parameters
- $bytes : int
Tags
Return values
stringrandom_int()
Fetch a random integer between $min and $max inclusive
random_int(int $min, int $max) : int
Parameters
- $min : int
- $max : int
Tags
Return values
intgetallheaders()
Get all HTTP header key/values as an associative array for the current request.
getallheaders() : mixed
Return values
mixed —The HTTP header key/value pairs.
idn_to_ascii()
idn_to_ascii(mixed $domain[, mixed $options = IDNA_DEFAULT ][, mixed $variant = INTL_IDNA_VARIANT_UTS46 ][, mixed &$idna_info = array() ]) : mixed
Parameters
- $domain : mixed
- $options : mixed = IDNA_DEFAULT
- $variant : mixed = INTL_IDNA_VARIANT_UTS46
- $idna_info : mixed = array()
idn_to_utf8()
idn_to_utf8(mixed $domain[, mixed $options = IDNA_DEFAULT ][, mixed $variant = INTL_IDNA_VARIANT_UTS46 ][, mixed &$idna_info = array() ]) : mixed
Parameters
- $domain : mixed
- $options : mixed = IDNA_DEFAULT
- $variant : mixed = INTL_IDNA_VARIANT_UTS46
- $idna_info : mixed = array()
normalizer_is_normalized()
normalizer_is_normalized(mixed $input[, mixed $form = pNormalizer::NFC ]) : mixed
Parameters
- $input : mixed
- $form : mixed = pNormalizer::NFC
normalizer_normalize()
normalizer_normalize(mixed $input[, mixed $form = pNormalizer::NFC ]) : mixed
Parameters
- $input : mixed
- $form : mixed = pNormalizer::NFC
intdiv()
intdiv(mixed $num1, mixed $num2) : mixed
Parameters
- $num1 : mixed
- $num2 : mixed
preg_replace_callback_array()
preg_replace_callback_array(array<string|int, mixed> $pattern, mixed $subject[, mixed $limit = -1 ][, mixed &$count = 0 ][, mixed $flags = null ]) : mixed
Parameters
- $pattern : array<string|int, mixed>
- $subject : mixed
- $limit : mixed = -1
- $count : mixed = 0
- $flags : mixed = null
error_clear_last()
error_clear_last() : mixed
sapi_windows_vt100_support()
sapi_windows_vt100_support(mixed $stream[, mixed $enable = null ]) : mixed
Parameters
- $stream : mixed
- $enable : mixed = null
stream_isatty()
stream_isatty(mixed $stream) : mixed
Parameters
- $stream : mixed
utf8_encode()
utf8_encode(mixed $string) : mixed
Parameters
- $string : mixed
utf8_decode()
utf8_decode(mixed $string) : mixed
Parameters
- $string : mixed
spl_object_id()
spl_object_id(mixed $object) : mixed
Parameters
- $object : mixed
mb_ord()
mb_ord(mixed $string[, mixed $encoding = null ]) : mixed
Parameters
- $string : mixed
- $encoding : mixed = null
mb_chr()
mb_chr(mixed $codepoint[, mixed $encoding = null ]) : mixed
Parameters
- $codepoint : mixed
- $encoding : mixed = null
mb_scrub()
mb_scrub(mixed $string[, mixed $encoding = null ]) : mixed
Parameters
- $string : mixed
- $encoding : mixed = null
get_api_payment_weixin_query()
微信订单查寻 在订单中要调用,用户检测是否支付成功 如果需要支付宝,那么要实现 get_api_payment_alipay_query
get_api_payment_weixin_query(mixed $order_num) : mixed
Parameters
- $order_num : mixed
payment_weixin_refund()
微信支付退款 如果需要支付宝,那么要实现 payment_alipay_refund
payment_weixin_refund(mixed $order_num, mixed $total_fee, mixed $refund_amount[, mixed $refund_desc = '' ]) : mixed
Parameters
- $order_num : mixed
- $total_fee : mixed
- $refund_amount : mixed
- $refund_desc : mixed = ''
payemnt_insert_base()
写入支付信息
payemnt_insert_base(mixed $out_trade_no, mixed $data) : mixed
Parameters
- $out_trade_no : mixed
- $data : mixed
get_payment_base()
获取支付信息
get_payment_base(mixed $out_trade_no) : mixed
Parameters
- $out_trade_no : mixed
get_payment_base_by_id()
获取支付信息
get_payment_base_by_id(mixed $pay_id[, mixed $status = 1 ]) : mixed
Parameters
- $pay_id : mixed
- $status : mixed = 1
update_payment_base()
更新支付信息
update_payment_base(mixed $out_trade_no, mixed $data) : mixed
Parameters
- $out_trade_no : mixed
- $data : mixed
insert_payment_refund_info()
写入退款信息
insert_payment_refund_info(mixed $arr) : mixed
Parameters
- $arr : mixed
get_webtool_wx()
get_webtool_wx() : mixed
add_webtool_cmd_job()
add_webtool_cmd_job(mixed $cmd) : mixed
Parameters
- $cmd : mixed
create_oss_remote_url()
create_oss_remote_url(mixed $url) : mixed
Parameters
- $url : mixed
add_oss_info()
add_oss_info(mixed $type, mixed $file, mixed $remote_url) : mixed
Parameters
- $type : mixed
- $file : mixed
- $remote_url : mixed
webtool_log()
webtool_log(mixed $type, mixed $title, mixed $par[, mixed $is_update = false ]) : mixed
Parameters
- $type : mixed
- $title : mixed
- $par : mixed
- $is_update : mixed = false
update_webtool_log()
update_webtool_log(mixed $id[, mixed $data = [] ][, mixed $flag = 'ok' ]) : mixed
Parameters
- $id : mixed
- $data : mixed = []
- $flag : mixed = 'ok'
set_webtool_printer_finish()
set_webtool_printer_finish(mixed $job_id) : mixed
Parameters
- $job_id : mixed
close_webtool_printer_job()
close_webtool_printer_job(mixed $job_id) : mixed
Parameters
- $job_id : mixed
get_captcha_drive()
get_captcha_drive() : mixed
get_captcha_check()
get_captcha_check([mixed $ignore_expire = false ]) : mixed
Parameters
- $ignore_expire : mixed = false
get_captcha_init()
get_captcha_init([mixed $output = true ]) : mixed
Parameters
- $output : mixed = true
element()
element(mixed $name, mixed $data) : mixed
Parameters
- $name : mixed
- $data : mixed
element_to_str()
element_to_str(mixed $arr) : mixed
Parameters
- $arr : mixed
element_vue()
element_vue() : mixed
element_open_pdf()
element_open_pdf() : mixed
element_open_office()
element_open_office() : mixed
predis()
redis
predis([mixed $host = '' ][, mixed $port = '' ][, mixed $auth = '' ]) : mixed
Parameters
- $host : mixed = ''
- $port : mixed = ''
- $auth : mixed = ''
predis_add_geo()
添加位置信息 predis_add_geo('places',[ [ 'lng'=>'116.397128', 'lat'=>'39.916527', 'title'=>'北京天安门' ], ]);
predis_add_geo(mixed $key[, mixed $arr = [] ]) : mixed
Parameters
- $key : mixed
- $arr : mixed = []
predis_delete_geo()
删除位置信息
predis_delete_geo(mixed $key[, mixed $arr = [] ]) : mixed
predis_delete_geo('places',[ '北京天安门', ]);
Parameters
- $key : mixed
- $arr : mixed = []
predis_get_pager()
返回附近的地理位置 pr(predis_get_pager('places', 116.403958, 39.915049)); http://redisdoc.com/geo/georadius.html
predis_get_pager(mixed $key, mixed $lat, mixed $lng[, mixed $juli = 2 ][, mixed $sort = 'ASC' ][, mixed $to_fixed = 2 ]) : mixed
Parameters
- $key : mixed
- $lat : mixed
- $lng : mixed
- $juli : mixed = 2
- $sort : mixed = 'ASC'
- $to_fixed : mixed = 2
predis_geo_pos()
取lat lng
predis_geo_pos(mixed $key[, mixed $title = [] ][, mixed $to_fixed = 6 ]) : mixed
Parameters
- $key : mixed
- $title : mixed = []
- $to_fixed : mixed = 6
array_to_pager()
分组分页
array_to_pager(mixed $arr) : mixed
Parameters
- $arr : mixed
get_url_remove_http()
返回URL路径,不含有域名部分
get_url_remove_http(mixed $url) : mixed
Parameters
- $url : mixed
get_ext_by_url()
取后缀 add_action("get_ext_by_url",function(&$data){ $url = $data['url']; $data['ext'] = 'pdf'; });
get_ext_by_url(mixed $url) : mixed
Parameters
- $url : mixed
get_mime()
通过URL取mime
get_mime(mixed $url) : mixed
Parameters
- $url : mixed
-
URL
get_mime_content()
取mime
get_mime_content(mixed $content[, mixed $just_return_ext = false ]) : mixed
Parameters
- $content : mixed
-
文件内容,可以是通过file_get_contents取到的
- $just_return_ext : mixed = false
get_remote_file()
获取远程URL内容
get_remote_file(mixed $url[, mixed $is_json = false ]) : mixed
Parameters
- $url : mixed
- $is_json : mixed = false
remove_host()
移除主域名部分
remove_host(mixed $url) : mixed
Parameters
- $url : mixed
download_file()
下载文件 建议使用 download_file_safe
download_file(mixed $url[, mixed $contain_http = false ]) : mixed
Parameters
- $url : mixed
- $contain_http : mixed = false
download_file_safe()
下载资源文件到本地
download_file_safe(mixed $url[, mixed $mimes = ['image/*', 'video/*'] ][, mixed $cons = [] ][, mixed $contain_http = false ]) : mixed
Parameters
- $url : mixed
- $mimes : mixed = ['image/*', 'video/*']
- $cons : mixed = []
- $contain_http : mixed = false
download_remote_file()
下载远程文件 global $remote_to_local_path; $remote_to_local_path = '/uploads/saved/'.date("Y-m-d");
download_remote_file(mixed $url[, mixed $path = '' ][, mixed $name = '' ]) : mixed
Parameters
- $url : mixed
- $path : mixed = ''
- $name : mixed = ''
curl_aliyun()
调用阿里云
curl_aliyun(mixed $url[, mixed $bodys = '' ][, mixed $method = 'POST' ]) : mixed
Parameters
- $url : mixed
- $bodys : mixed = ''
- $method : mixed = 'POST'
success_data()
返回成功的json信息
success_data(mixed $data[, mixed $msg = '' ]) : mixed
Parameters
- $data : mixed
- $msg : mixed = ''
error_data()
返回失败的json信息
error_data(mixed $msg) : mixed
Parameters
- $msg : mixed
get_path_info()
pathinfo /index.php/admin/auth/index?code=2 返回 admin/auth/index 数组时返回 ['admin','auth','index']
get_path_info([mixed $return_array = false ]) : mixed
Parameters
- $return_array : mixed = false
router_pathinfo()
支持pathinfo路由 未找到请用 pathinfo_not_find 函数
router_pathinfo([mixed $ns = 'app' ][, mixed $add_controller = 'controller' ][, mixed $ucfirst_controller = true ]) : mixed
Parameters
- $ns : mixed = 'app'
- $add_controller : mixed = 'controller'
- $ucfirst_controller : mixed = true
make_rand_code()
生成数字随机数 一般用于核销 需要表名 rand_code 字段 nid code status默认0
make_rand_code(mixed $node_id) : mixed
Parameters
- $node_id : mixed
update_make_rand_code()
核销后需要释放核销码
update_make_rand_code(mixed $node_id) : mixed
Parameters
- $node_id : mixed
set_lock()
锁功能已替代 lock_call('k',functon(){
set_lock(mixed $key[, mixed $exp_time = 60 ]) : mixed
},second);
Parameters
- $key : mixed
- $exp_time : mixed = 60
get_lock()
获取是否锁定
get_lock(mixed $key) : mixed
Parameters
- $key : mixed
del_lock()
释放锁定
del_lock(mixed $key) : mixed
Parameters
- $key : mixed
json_replace()
json数据替换
json_replace(mixed $json[, mixed $replace = [] ][, mixed $return_json = true ]) : mixed
Parameters
- $json : mixed
-
json格式数组或数组
- $replace : mixed = []
-
要替换的数组,如$replace = ['appid'=>'new appid'];
- $return_json : mixed = true
-
默认返回JSON格式
remove_php_notes()
去除PHP代码注释
remove_php_notes(mixed $content) : mixed
Parameters
- $content : mixed
online_view_office()
在线查看office文件
online_view_office(mixed $url) : mixed
Parameters
- $url : mixed
printfs()
格式化输出金额 强制输出数字类型
printfs(mixed &$v[, mixed $keys = [] ][, mixed $dot = 2 ]) : mixed
Parameters
- $v : mixed
- $keys : mixed = []
- $dot : mixed = 2
float_noup()
float不进位,如3.145 返回3.14 进位的有默认round(3.145) 或sprintf("%.2f",3.145);
float_noup(mixed $float_number[, mixed $dot = 2 ]) : mixed
Parameters
- $float_number : mixed
- $dot : mixed = 2
float_up()
四舍五入
float_up(mixed $float_number[, mixed $dot = 2 ][, mixed $mid_val = 5 ]) : mixed
Parameters
- $float_number : mixed
- $dot : mixed = 2
- $mid_val : mixed = 5
-
逢几进位
load_xls()
加载xlsx load_xls([ 'file' => $xls, 'config'=>[ '序号' =>'index', ], 'title_line'=>1, 'call'=>function($i,$row,&$d){} ]);
load_xls([mixed $new_arr = [] ]) : mixed
Parameters
- $new_arr : mixed = []
get_lines()
获取文件行数,不包空行
get_lines(mixed $file[, mixed $length = 40960 ]) : mixed
Parameters
- $file : mixed
- $length : mixed = 40960
get_request_top()
返回请求中是http还是https
get_request_top() : mixed
get_request_host()
返回请求域名及URL部分,不包含http://
get_request_host() : mixed
auto_jump()
自动跳转到https网站
auto_jump() : mixed
get_http_full_url()
get_http_full_url(mixed $url[, mixed $fun = 'cdn_url' ]) : mixed
Parameters
- $url : mixed
- $fun : mixed = 'cdn_url'
get_index_array_valule()
从数组中搜索
get_index_array_valule(mixed $array, mixed $key, mixed $val) : mixed
Parameters
- $array : mixed
- $key : mixed
- $val : mixed
gbk_substr()
gbk_substr(mixed $text, mixed $start, mixed $len[, mixed $gbk = 'GBK' ]) : mixed
Parameters
- $text : mixed
- $start : mixed
- $len : mixed
- $gbk : mixed = 'GBK'
get_gbk_len()
GBK长宽 2个字符
get_gbk_len(mixed $value[, mixed $gbk = 'GBK' ]) : mixed
Parameters
- $value : mixed
- $gbk : mixed = 'GBK'
get_text_c()
文字居中
get_text_c(string $str, int $len) : mixed
Parameters
- $str : string
- $len : int
get_text_lr()
文字排版 左 中 右 左 右
get_text_lr(array<string|int, mixed> $arr, int $length[, mixed $return_arr = false ]) : mixed
Parameters
- $arr : array<string|int, mixed>
- $length : int
- $return_arr : mixed = false
allow_cross_origin()
处理跨域
allow_cross_origin() : mixed
to_utf8()
to_utf8(mixed $str) : mixed
Parameters
- $str : mixed
csv_reader()
csv_reader(mixed $file) : mixed
Parameters
- $file : mixed
csv_writer()
csv_writer(mixed $file[, mixed $header = [] ][, mixed $content = [] ]) : mixed
Parameters
- $file : mixed
- $header : mixed = []
- $content : mixed = []
lock_call()
基于redis锁
lock_call(mixed $key, mixed $call[, mixed $time = 10 ]) : mixed
global $redis_lock; //锁前缀 global $lock_key;
$redis_lock = [ 'host'=>'', 'port'=>'', 'auth'=>'', ];
lock_call('k',functon()},1); 或 if(lock_start('k')){ .. lock_end(); }
Parameters
- $key : mixed
- $call : mixed
- $time : mixed = 10
lock_start()
开始锁
lock_start(mixed $key[, mixed $time = 1 ]) : mixed
Parameters
- $key : mixed
- $time : mixed = 1
lock_end()
释放锁
lock_end() : mixed
compare_date()
compare_date(mixed $a, mixed $b) : mixed
Parameters
- $a : mixed
- $b : mixed
redis_pub()
发布消息 redis_pub("demo","welcome man"); redis_pub("demo",['title'=>'yourname']);
redis_pub(mixed $channel, mixed $message) : mixed
Parameters
- $channel : mixed
- $message : mixed
redis_sub()
取订阅消息 redis_sub("demo",function($channel,$message){ echo "channel ".$channel."\n"; print_r($message); });
redis_sub(mixed $channel, mixed $call[, mixed $unsubscribe = false ]) : mixed
Parameters
- $channel : mixed
- $call : mixed
- $unsubscribe : mixed = false
send_pusher()
send_pusher([mixed $data = [] ][, mixed $channel = 'netteadmin' ][, mixed $event = 'notice' ]) : mixed
Parameters
- $data : mixed = []
- $channel : mixed = 'netteadmin'
- $event : mixed = 'notice'
think_check_sign()
think_check_sign(mixed $json_string[, mixed $key = '' ][, mixed $sign_key = 'sign' ]) : mixed
Parameters
- $json_string : mixed
- $key : mixed = ''
- $sign_key : mixed = 'sign'
think_create_sign()
think_create_sign([mixed $arr = [] ][, mixed $key = '' ]) : mixed
Parameters
- $arr : mixed = []
- $key : mixed = ''
get_str_ord()
get_str_ord(mixed $str[, mixed $is_join = false ]) : mixed
Parameters
- $str : mixed
- $is_join : mixed = false
gz_encode()
gz_encode(mixed $arr_or_str) : mixed
Parameters
- $arr_or_str : mixed
gz_decode()
gz_decode(mixed $str) : mixed
Parameters
- $str : mixed
html_to_pdf()
html_to_pdf(mixed $input_html_file, mixed $output_pdf_file[, mixed $return_cmd = false ][, mixed $exec = false ]) : mixed
Parameters
- $input_html_file : mixed
- $output_pdf_file : mixed
- $return_cmd : mixed = false
- $exec : mixed = false
get_barcode()
https://github.com/picqer/php-barcode-generator/blob/main/src/BarcodeGenerator.php C128 C128A C128B C128C C93 EAN13 EAN8 EAN2
get_barcode(mixed $code[, mixed $type = 'C128' ][, mixed $widthFactor = 2 ][, mixed $height = 30 ][, mixed $foregroundColor = [0, 0, 0] ]) : mixed
Parameters
- $code : mixed
- $type : mixed = 'C128'
- $widthFactor : mixed = 2
- $height : mixed = 30
- $foregroundColor : mixed = [0, 0, 0]
text_add_br()
text_add_br(mixed $text, mixed $w[, mixed $br = '<br>' ]) : mixed
Parameters
- $text : mixed
- $w : mixed
- $br : mixed = '<br>'
get_server_headers()
get_server_headers([mixed $name = '' ]) : mixed
Parameters
- $name : mixed = ''
output_js_css()
output_js_css([mixed $js = '' ][, mixed $css = '' ]) : mixed
Parameters
- $js : mixed = ''
- $css : mixed = ''
file_parse()
解析文件内容
file_parse(mixed $file[, mixed $zip_output_dir = '' ][, mixed $need_remove = false ]) : mixed
支持 zip pdf xml pdf读取 yum install poppler-utils odf转pdf pip install mupdf
file_parse(DIR.'/1.zip',DIR."/tmp"); file_parse(DIR.'/2.xml',DIR);
Parameters
- $file : mixed
- $zip_output_dir : mixed = ''
- $need_remove : mixed = false
Tags
show_number()
优化数量显示 1.10显示为1.1 1.05显示为1.05 1.00显示为1
show_number(mixed $num) : mixed
Parameters
- $num : mixed
get_str_number()
取字符中的数字
get_str_number(mixed $input) : mixed
Parameters
- $input : mixed
line_bezier()
贝塞尔
line_bezier([mixed $opt = [] ][, mixed $return = 'base64' ]) : mixed
Parameters
- $opt : mixed = []
- $return : mixed = 'base64'
-
blob | base64 当为blob时 header("Content-Type: image/png");echo $blob;exit; 当为base64时 echo "";
num_to_chinese()
数字转中文,非金额读法
num_to_chinese(mixed $num) : mixed
Parameters
- $num : mixed
get_video_time()
获取本地音视频时长 https://github.com/JamesHeinrich/getID3 composer require james-heinrich/getid3
get_video_time(mixed $video_local_path[, mixed $ret_time = true ]) : mixed
Parameters
- $video_local_path : mixed
- $ret_time : mixed = true
copy_dir()
目录 复制到 另一个目录
copy_dir(mixed $source, mixed $dest) : mixed
Parameters
- $source : mixed
- $dest : mixed
unzip_tar()
解压zip、7z、gz、tar、bz2包 yum -y install p7zip unar unzip
unzip_tar(mixed $input[, mixed $output_base = '' ]) : mixed
Parameters
- $input : mixed
- $output_base : mixed = ''
think_exec()
exec
think_exec(mixed $cmd[, mixed &$output = '' ][, mixed $show_err = false ]) : mixed
Parameters
- $cmd : mixed
- $output : mixed = ''
- $show_err : mixed = false
xml2array()
xml2array(mixed $xml_content) : mixed
Parameters
- $xml_content : mixed
_xml2array_node()
_xml2array_node(mixed $node) : mixed
Parameters
- $node : mixed
array2xml()
array2xml(mixed $arr[, mixed $root = '' ]) : mixed
Parameters
- $arr : mixed
- $root : mixed = ''
is_image_ext()
是否是图片
is_image_ext(mixed $url) : mixed
Parameters
- $url : mixed
is_video_ext()
是否是视频
is_video_ext(mixed $url) : mixed
Parameters
- $url : mixed
is_audio_ext()
是否是音频
is_audio_ext(mixed $url) : mixed
Parameters
- $url : mixed
copy_base64_data()
copy_base64_data() : mixed
set_scss_path()
set_scss_path(mixed $path) : mixed
Parameters
- $path : mixed
scss()
scss(mixed $css[, mixed $is_cached = false ]) : mixed
Parameters
- $css : mixed
- $is_cached : mixed = false
get_ws_js()
HTML端收消息 wss://yourdomain/wss ws://ip:port
get_ws_js(mixed $func[, mixed $ws = 'ws://127.0.0.1:3006' ]) : mixed
Parameters
- $func : mixed
- $ws : mixed = 'ws://127.0.0.1:3006'
create_node_ws_server()
生成node js ws服务 需要把返回的内容写入server.js中 依赖 ioredis
create_node_ws_server([mixed $ws_port = 3006 ][, mixed $topic = ['demo'] ][, mixed $redis_host = '127.0.0.1' ][, mixed $port = '6379' ][, mixed $auth = '' ]) : mixed
Parameters
- $ws_port : mixed = 3006
- $topic : mixed = ['demo']
- $redis_host : mixed = '127.0.0.1'
- $port : mixed = '6379'
- $auth : mixed = ''
xis_ssl()
xis_ssl() : mixed
xcookie()
xcookie(mixed $name[, mixed $value = '' ][, mixed $expire = 0 ]) : mixed
Parameters
- $name : mixed
- $value : mixed = ''
- $expire : mixed = 0
xcookie_delete()
xcookie_delete(mixed $name) : mixed
Parameters
- $name : mixed
rpc_client()
rpc_client(mixed $url[, mixed $is_remote = false ]) : mixed
Parameters
- $url : mixed
- $is_remote : mixed = false
rpc_server()
rpc_server(mixed $class) : mixed
Parameters
- $class : mixed
rpc_token()
rpc_token() : mixed
call_retry()
尝试多次运行 $times 运行次数 $usleep_time 毫秒
call_retry(mixed $func[, mixed $times = 3 ][, mixed $usleep_time = 1000 ]) : mixed
Parameters
- $func : mixed
- $times : mixed = 3
- $usleep_time : mixed = 1000
array_to_tree()
数组转tree
array_to_tree(mixed $list[, mixed $pk = 'id' ][, mixed $pid = 'pid' ][, mixed $child = 'children' ][, mixed $root = 0 ][, mixed $my_id = '' ]) : mixed
输入$list [ {id:1,pid:0,其他字段}, {id:2,pid:1,其他字段}, {id:3,pid:1,其他字段}, ] 输出 [ [ id:1, pid:0, 其他字段, children:[ {id:2,pid:1,其他字段}, {id:3,pid:1,其他字段}, ] ] ]
Parameters
- $list : mixed
- $pk : mixed = 'id'
- $pid : mixed = 'pid'
- $child : mixed = 'children'
- $root : mixed = 0
- $my_id : mixed = ''
pr()
数组或字符输出,方便查看
pr(mixed $str) : mixed
Parameters
- $str : mixed
add_action()
add_action(mixed $name, mixed $call[, mixed $level = 20 ]) : mixed
Parameters
- $name : mixed
- $call : mixed
- $level : mixed = 20
do_action()
do_action(mixed $name[, mixed &$par = null ]) : mixed
Parameters
- $name : mixed
- $par : mixed = null
is_cli()
is_cli() : mixed
is_post()
is_post() : mixed
is_json()
is_json(mixed $data[, mixed $assoc = false ]) : mixed
Parameters
- $data : mixed
- $assoc : mixed = false
array_to_object()
array_to_object(mixed $arr) : mixed
Parameters
- $arr : mixed
object_to_array()
object_to_array(mixed $obj) : mixed
Parameters
- $obj : mixed
get_dir()
get_dir(mixed $name) : mixed
Parameters
- $name : mixed
get_ext()
get_ext(mixed $name) : mixed
Parameters
- $name : mixed
get_name()
get_name(mixed $name) : mixed
Parameters
- $name : mixed
create_dir_if_not_exists()
create_dir_if_not_exists(mixed $arr) : mixed
Parameters
- $arr : mixed
is_local()
is_local() : mixed
get_ip()
get_ip([mixed $type = 0 ][, mixed $adv = false ]) : mixed
Parameters
- $type : mixed = 0
- $adv : mixed = false
now()
now() : mixed
get_distance()
get_distance(mixed $longitude1, mixed $latitude1, mixed $longitude2, mixed $latitude2[, mixed $unit = 2 ][, mixed $decimal = 2 ]) : mixed
Parameters
- $longitude1 : mixed
- $latitude1 : mixed
- $longitude2 : mixed
- $latitude2 : mixed
- $unit : mixed = 2
- $decimal : mixed = 2
get_deep_dir()
get_deep_dir(mixed $path) : mixed
Parameters
- $path : mixed
price_format()
price_format(mixed $yuan[, mixed $dot = 2 ]) : mixed
Parameters
- $yuan : mixed
- $dot : mixed = 2
json()
json([mixed $arr = [] ]) : mixed
Parameters
- $arr : mixed = []
json_error()
json_error([mixed $arr = [] ][, mixed $is_array = false ]) : mixed
Parameters
- $arr : mixed = []
- $is_array : mixed = false
json_success()
json_success([mixed $arr = [] ][, mixed $is_array = false ]) : mixed
Parameters
- $arr : mixed = []
- $is_array : mixed = false
yaml_load()
yaml_load(mixed $str) : mixed
Parameters
- $str : mixed
yaml_dump()
yaml_dump(mixed $array[, mixed $line = 3 ]) : mixed
Parameters
- $array : mixed
- $line : mixed = 3
yaml()
yaml(mixed $str) : mixed
Parameters
- $str : mixed
aes_encode()
aes_encode(mixed $data[, mixed $key = '' ][, mixed $iv = '' ][, mixed $type = 'AES-128-CBC' ][, mixed $options = '' ]) : mixed
Parameters
- $data : mixed
- $key : mixed = ''
- $iv : mixed = ''
- $type : mixed = 'AES-128-CBC'
- $options : mixed = ''
aes_decode()
aes_decode(mixed $data[, mixed $key = '' ][, mixed $iv = '' ][, mixed $type = 'AES-128-CBC' ][, mixed $options = '' ]) : mixed
Parameters
- $data : mixed
- $key : mixed = ''
- $iv : mixed = ''
- $type : mixed = 'AES-128-CBC'
- $options : mixed = ''
string_to_array()
string_to_array(mixed $name[, mixed $array = '' ]) : mixed
Parameters
- $name : mixed
- $array : mixed = ''
get_dates()
get_dates(mixed $start, mixed $end[, mixed $contain_last = true ]) : mixed
Parameters
- $start : mixed
- $end : mixed
- $contain_last : mixed = true
get_date_china()
get_date_china(mixed $date) : mixed
Parameters
- $date : mixed
timeago()
timeago(mixed $time) : mixed
Parameters
- $time : mixed
is_ajax()
is_ajax() : mixed
import()
import(mixed $file[, mixed $vars = [] ][, mixed $check_vars = false ]) : mixed
Parameters
- $file : mixed
- $vars : mixed = []
- $check_vars : mixed = false
get_reffer()
get_reffer([mixed $refer = '' ]) : mixed
Parameters
- $refer : mixed = ''
get_root_domain()
get_root_domain([mixed $host = '' ]) : mixed
Parameters
- $host : mixed = ''
get_sub_domain()
get_sub_domain([mixed $host = '' ]) : mixed
Parameters
- $host : mixed = ''
sign_by_secret()
sign_by_secret(mixed $params[, mixed $secret = '' ][, mixed $array_encode = false ]) : mixed
Parameters
- $params : mixed
- $secret : mixed = ''
- $array_encode : mixed = false
zip_extract()
zip_extract(mixed $local_file, mixed $extract_local_dir) : mixed
Parameters
- $local_file : mixed
- $extract_local_dir : mixed
zip_create()
zip_create(mixed $local_zip_file[, mixed $files = [] ]) : mixed
Parameters
- $local_zip_file : mixed
- $files : mixed = []
is_json_request()
is_json_request() : mixed
array_to_el_select()
array_to_el_select(mixed $all, mixed $v, mixed $k) : mixed
Parameters
- $all : mixed
- $v : mixed
- $k : mixed
echats()
echats(mixed $ele[, mixed $options = [] ]) : mixed
Parameters
- $ele : mixed
- $options : mixed = []
echats_reload()
echats_reload() : mixed
echarts()
echarts(mixed $ele[, mixed $options = [] ]) : mixed
Parameters
- $ele : mixed
- $options : mixed = []
echarts_reload()
echarts_reload() : mixed
set_field_allow()
设置允许字段
set_field_allow(mixed $collect, mixed $field) : mixed
Parameters
- $collect : mixed
- $field : mixed
get_field_allow()
获取允许字段
get_field_allow(mixed $collect) : mixed
Parameters
- $collect : mixed
get_data_allow()
返回允许字段值
get_data_allow(mixed $collect, mixed $input) : mixed
Parameters
- $collect : mixed
- $input : mixed
is_ssl()
is_ssl() : mixed
think_validate()
think_validate(mixed $labels, mixed $data, mixed $rules[, mixed $show_array = false ]) : mixed
Parameters
- $labels : mixed
- $data : mixed
- $rules : mixed
- $show_array : mixed = false
validate()
validate(mixed $labels, mixed $data, mixed $rules[, mixed $show_array = false ]) : mixed
Parameters
- $labels : mixed
- $data : mixed
- $rules : mixed
- $show_array : mixed = false
jump()
jump(mixed $url) : mixed
Parameters
- $url : mixed
set_url_use_cdn()
对数组添加cdn url
set_url_use_cdn(mixed &$row[, mixed $field = [] ]) : mixed
Parameters
- $row : mixed
- $field : mixed = []
push_task()
添加到队列 "topthink/think-queue": "^3" push_task('app\printer\job\Printer',['tt'=>11],'');
push_task(mixed $job[, mixed $data = '' ][, mixed $queue = '' ]) : mixed
Parameters
- $job : mixed
- $data : mixed = ''
- $queue : mixed = ''
loop_tree()
向上取递归 如当前分类是3,将返回 123所有的值 $arr = loop_tree("catalog",$v['catalog_id'],true); foreach($arr as $vv){ $title[] = $vv['title']; } id pid 1 0 2 1 3 2
loop_tree(mixed $table, mixed $id[, mixed $is_frist = true ]) : mixed
Parameters
- $table : mixed
- $id : mixed
- $is_frist : mixed = true
get_loop_tree_ids()
向下递归
get_loop_tree_ids(mixed $table, mixed $id[, mixed $where = [] ][, mixed $get_field = 'id' ]) : mixed
Parameters
- $table : mixed
- $id : mixed
- $where : mixed = []
- $get_field : mixed = 'id'
loop_del()
递归删除
loop_del(mixed $table, mixed $id[, mixed $where = [] ]) : mixed
Parameters
- $table : mixed
- $id : mixed
- $where : mixed = []
el_table_tree()
用于tree表格排序 因为tree给的lists字段是用于显示,在排序时得到的index是不正确的, 此时需要lists_sort字段得到正确的index 在交换排序值时才能正确保存并显示
el_table_tree(mixed $list, mixed $j[, mixed $is_top = false ]) : mixed
Parameters
- $list : mixed
- $j : mixed
- $is_top : mixed = false
el_cascader()
用于cascader字段 public function cascader(){ $catalog = db_get($this->table,"*",[ 'ORDER'=>catalog_default_order_by(), 'status'=>1 ]); $select = el_cascader(array_to_tree($catalog)); json_success(['data'=>$select]); } $catalog = db_get("catalog",[]); $select = el_cascader(array_to_tree($catalog));
el_cascader(mixed $select[, mixed $label = 'title' ][, mixed $value = 'id' ]) : mixed
Parameters
- $select : mixed
- $label : mixed = 'title'
- $value : mixed = 'id'
_loop_del_tree()
内部实现
_loop_del_tree(mixed $table, mixed $all) : mixed
Parameters
- $table : mixed
- $all : mixed
_loop_tree_deep_inner()
内部实现
_loop_tree_deep_inner(mixed $all, mixed $get_field[, mixed $is_frist = false ]) : mixed
Parameters
- $all : mixed
- $get_field : mixed
- $is_frist : mixed = false
get_xss_clean_ins()
get_xss_clean_ins() : mixed
xss_clean_str()
xss_clean_str(mixed $str) : mixed
Parameters
- $str : mixed
xss_clean()
xss_clean(mixed $input) : mixed
Parameters
- $input : mixed
global_trim()
global_trim() : mixed
global_trim_inner()
global_trim_inner(mixed &$in) : mixed
Parameters
- $in : mixed
get()
get([mixed $key = "" ]) : mixed
Parameters
- $key : mixed = ""
get_req_post()
get_req_post([mixed $key = "" ]) : mixed
Parameters
- $key : mixed = ""
g()
g([mixed $key = null ]) : mixed
Parameters
- $key : mixed = null
get_input()
get_input() : mixed
guzzle_http()
guzzle_http([mixed $click_option = [] ]) : mixed
Parameters
- $click_option : mixed = []
guzzle_http_fake_option()
guzzle_http_fake_option() : mixed
get_template()
get_template(mixed $name[, mixed $replace_arr = [] ]) : mixed
Parameters
- $name : mixed
- $replace_arr : mixed = []
get_api_data()
获取接口请求数据,如果存在将不发起接口请求
get_api_data(mixed $title, mixed $name) : mixed
Parameters
- $title : mixed
- $name : mixed
api_data_insert()
记录接口请求数据
api_data_insert([mixed $data = [] ]) : mixed
Parameters
- $data : mixed = []
cookie()
cookie(mixed $name[, mixed $value = '' ][, mixed $expire = 0 ]) : mixed
Parameters
- $name : mixed
- $value : mixed = ''
- $expire : mixed = 0
cookie_delete()
cookie_delete(mixed $name) : mixed
Parameters
- $name : mixed
get_env()
获取ENV
get_env(mixed $key) : mixed
Parameters
- $key : mixed
set_env()
设置ENV
set_env(mixed $key, mixed $val) : mixed
Parameters
- $key : mixed
- $val : mixed
set_config()
set_config(mixed $title, mixed $body) : mixed
Parameters
- $title : mixed
- $body : mixed
get_config()
get_config(mixed $title) : mixed
Parameters
- $title : mixed
get_id_by_auto_insert()
设置或取ID
get_id_by_auto_insert(mixed $table[, mixed $data = [] ][, mixed $where = [] ][, mixed $has_time_and_update = false ]) : mixed
Parameters
- $table : mixed
- $data : mixed = []
- $where : mixed = []
- $has_time_and_update : mixed = false
get_all_or_one()
取一条或多条记录 get_all_or_one("novel_book",$where,'get_novel_book_row');
get_all_or_one(mixed $table, mixed $where[, mixed $fun = '' ][, mixed $limit = '' ]) : mixed
Parameters
- $table : mixed
- $where : mixed
- $fun : mixed = ''
- $limit : mixed = ''
db_set_field_type()
db_set_field_type(mixed $table, mixed $data) : mixed
Parameters
- $table : mixed
- $data : mixed
db_reset_data_by_filed_type()
权限字段类型设置值
db_reset_data_by_filed_type(mixed $table, mixed &$data) : mixed
Parameters
- $table : mixed
- $data : mixed
db_active()
激活数据库连接
db_active([mixed $value = 'mongo' ]) : mixed
Parameters
- $value : mixed = 'mongo'
db_active_default()
使用默认monogo连接
db_active_default() : mixed
db_get_group()
group by 查寻
db_get_group(mixed $table[, mixed $field = [] ][, mixed $options = [] ][, mixed $is_pager = false ]) : mixed
Parameters
- $table : mixed
- $field : mixed = []
- $options : mixed = []
- $is_pager : mixed = false
_db_group_con()
mongodb groupby兼容
_db_group_con(mixed $k, mixed $value[, mixed $up_value = '' ]) : mixed
Parameters
- $k : mixed
- $value : mixed
- $up_value : mixed = ''
db_update()
数据库更新记录
db_update(mixed $table, mixed $update_data, mixed $where[, mixed $use_action = true ]) : mixed
Parameters
- $table : mixed
- $update_data : mixed
- $where : mixed
- $use_action : mixed = true
db_del()
数据库删除记录
db_del(mixed $table, mixed $where) : mixed
Parameters
- $table : mixed
- $where : mixed
db_insert()
向数据库添加记录
db_insert(mixed $table, mixed $data[, mixed $use_action = true ]) : mixed
Parameters
- $table : mixed
- $data : mixed
- $use_action : mixed = true
_db_get_when_array()
内部调用,处理 where条件是数组的情况
_db_get_when_array(mixed $list, mixed $call) : mixed
Parameters
- $list : mixed
- $call : mixed
db_get_one()
数据库查寻
db_get_one(mixed $table, mixed $field[, mixed $call = null ]) : mixed
Parameters
- $table : mixed
- $field : mixed
- $call : mixed = null
set_db_cache()
设置数据库查寻字段走缓存
set_db_cache(mixed $table, mixed $field) : mixed
Parameters
- $table : mixed
- $field : mixed
get_db_cache_key()
取缓存key
get_db_cache_key(mixed $table, mixed $where) : mixed
Parameters
- $table : mixed
- $where : mixed
get_db_cache_where()
取缓存where
get_db_cache_where(mixed $table, mixed $where) : mixed
Parameters
- $table : mixed
- $where : mixed
db_get_cache()
取数据,带缓存
db_get_cache(mixed $table[, mixed $where = [] ][, mixed $limit = null ]) : mixed
Parameters
- $table : mixed
- $where : mixed = []
- $limit : mixed = null
db_get()
取数据
db_get(mixed $table[, mixed $field = null ][, mixed $call = null ][, mixed $limit = null ]) : mixed
Parameters
- $table : mixed
- $field : mixed = null
- $call : mixed = null
- $limit : mixed = null
db_get_count()
数量
db_get_count(mixed $table, mixed $call) : mixed
Parameters
- $table : mixed
- $call : mixed
db_get_sum()
计算SUM
db_get_sum(mixed $table, mixed $field, mixed $call) : mixed
Parameters
- $table : mixed
- $field : mixed
- $call : mixed
db_pager()
数据库分页
db_pager(mixed $table[, mixed $field = [] ][, mixed $call = [] ]) : mixed
Parameters
- $table : mixed
- $field : mixed = []
- $call : mixed = []
db_get_pager()
分页
db_get_pager(mixed $table, mixed $call) : mixed
Parameters
- $table : mixed
- $call : mixed
db_action()
mongodb事务
db_action(mixed $call) : mixed
Parameters
- $call : mixed
mongo_action()
mongo_action(mixed $call) : mixed
Parameters
- $call : mixed
db_allow()
数据库字段允许
db_allow(mixed $table, mixed $data) : mixed
Parameters
- $table : mixed
- $data : mixed
db_allow_set()
设置允许字段
db_allow_set(mixed $table, mixed $data) : mixed
Parameters
- $table : mixed
- $data : mixed
vue_get_jidu()
季度 返回 k=>{0:开始 1:结束 flag:}
vue_get_jidu([mixed $time = '' ]) : mixed
Parameters
- $time : mixed = ''
vue_get_jidu_array()
每个季度开始、结束时间
vue_get_jidu_array(mixed $year) : mixed
Parameters
- $year : mixed
vue_get_last_day()
某月的最后一天
vue_get_last_day([mixed $month = '2023-07' ]) : mixed
Parameters
- $month : mixed = '2023-07'
vue_message()
vue message
vue_message() : mixed
vue_loading()
loading效果
vue_loading([mixed $name = 'load' ][, mixed $txt = '加载中' ]) : mixed
Parameters
- $name : mixed = 'load'
- $txt : mixed = '加载中'
vue_el_table_drag()
<el-table class="draggable_video"></el-table>
vue_el_table_drag([mixed $ele = '.table' ][, mixed $data = 'form.video_list' ]) : mixed
$str = vue_el_table_drag($ele='.draggable_video',$data='form.video_list'); $vue->method("video_row_drop(ele)",$str); 表格拖拽
Parameters
- $ele : mixed = '.table'
- $data : mixed = 'form.video_list'
php_to_js()
Encodes a PHP variable into javascript representation.
php_to_js(mixed $value[, bool $safe = false ]) : string
Example:
$options=array('key1'=>true,'key2'=>123,'key3'=>'value'); echo php_to_js($options); // The following javascript code would be generated: // {'key1':true,'key2':123,'key3':'value'}
For highly complex data structures use and to serialize and unserialize.
If you are encoding user input, make sure $safe is set to true.
Parameters
- $value : mixed
-
PHP variable to be encoded
- $safe : bool = false
-
If true, 'js:' will not be allowed. In case of wrapping code with JavaScript expression will stay as is no matter what value this parameter is set to. Default is false. This parameter is available since 1.1.11.
Return values
string —the encoded string
yii_quote()
yii_quote(mixed $js[, mixed $forUrl = false ]) : mixed
Parameters
- $js : mixed
- $forUrl : mixed = false