• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP z函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中z函数的典型用法代码示例。如果您正苦于以下问题:PHP z函数的具体用法?PHP z怎么用?PHP z使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了z函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: add

 function add()
 {
     //ajax_echo( print_r( $_REQUEST , 1 ) );
     $name = z(t(v('name')));
     // remove spaces in name
     $name = str_replace(' ', '', $name);
     if (strlen($name) < 1) {
         return render(array('code' => 100002, 'message' => __('BAD_ARGS')), 'rest');
     }
     $email = z(t(v('email')));
     if (strlen($email) < 1) {
         return render(array('code' => 100002, 'message' => __('BAD_ARGS')), 'rest');
     }
     $password = z(t(v('password')));
     if (strlen($password) < 1) {
         return render(array('code' => 100002, 'message' => __('BAD_ARGS')), 'rest');
     }
     $params = array();
     $params['name'] = $name;
     $params['email'] = $email;
     $params['password'] = $password;
     if ($content = send_request('user_sign_up', $params, token())) {
         $data = json_decode($content, 1);
         if ($data['err_code'] != 0) {
             return render(array('code' => $data['err_code'], 'message' => $data['err_msg']), 'rest');
         }
         return render(array('code' => 0, 'data' => array('html' => render_html(array('item' => $data['data']), AROOT . 'view' . DS . 'layout' . DS . 'ajax' . DS . 'widget' . DS . 'buddy.tpl.html'))), 'rest');
     }
     return render(array('code' => 100001, 'message' => __('API_CONNECT_ERROR_NOTICE')), 'rest');
 }
开发者ID:wangkf,项目名称:TeamToy,代码行数:30,代码来源:buddy.class.php


示例2: f

function f($a, $b)
{
    static $c, $d;
    global $e, $f;
    $g = $h = x();
    list($i, list($j, $k)) = y();
    foreach (q() as $l => $m) {
    }
    $a++;
    $b++;
    $c++;
    $d++;
    $e++;
    $f++;
    $g++;
    $h++;
    $i++;
    $j++;
    $k++;
    $l++;
    $m++;
    $this++;
    $n++;
    // Only one that isn't declared.
    extract(z());
    $o++;
}
开发者ID:Halfnhav4,项目名称:pfff,代码行数:27,代码来源:t1.php


示例3: modify

 function modify($id)
 {
     $data = array();
     $data['title'] = z(v('title'));
     $data['subtitle'] = z(v('subtitle'));
     $data['state'] = z(v('state'));
     $this->db->where('id', $id)->limit(1);
     $this->db->update('w2_form', $data);
 }
开发者ID:yunsite,项目名称:easysns,代码行数:9,代码来源:form_model.php


示例4: plugin_mycss_save

function plugin_mycss_save()
{
    $css = z(t(v('css')));
    $sql = "REPLACE INTO `css` ( `uid` , `css` ) VALUES ( '" . intval(uid()) . "' , '" . s($css) . "' )";
    run_sql($sql);
    $location = '?c=plugin&a=mycss';
    if (db_errno() != 0) {
        return info_page(__('PL_CSS_MODIFIER_DATE_UPDATE_ERROR', $location));
    } else {
        header("Location:" . $location);
    }
}
开发者ID:xianliflc,项目名称:teamirr,代码行数:12,代码来源:app.php


示例5: plugin_mycss_save

function plugin_mycss_save()
{
    $css = z(t(v('css')));
    $sql = "REPLACE INTO `css` ( `uid` , `css` ) VALUES ( '" . intval(uid()) . "' , '" . s($css) . "' )";
    run_sql($sql);
    $location = '?c=plugin&a=mycss';
    if (db_errno() != 0) {
        return info_page('数据保存失败,请稍后重试。<a href="' . $location . '">点击返回</a>');
    } else {
        header("Location:" . $location);
    }
}
开发者ID:ramo01,项目名称:1kapp,代码行数:12,代码来源:app.php


示例6: plugin_basic_auth_save

function plugin_basic_auth_save()
{
    if (z(t(v('bauth_password'))) != z(t(v('bauth_password2')))) {
        return ajax_echo(__('PL_BASIC_AUTH_PASSWORD_NOT_SAME'));
    }
    $bauth_username = z(t(v('bauth_username')));
    $bauth_password = z(t(v('bauth_password')));
    $bauth_on = intval(t(v('bauth_on')));
    kset('bauth_username', $bauth_username);
    kset('bauth_password', $bauth_password);
    kset('bauth_on', $bauth_on);
    return ajax_echo(__('PL_BASIC_AUTH_SETTINGS_UPDATED') . '<script>setTimeout( close_float_box, 500)</script>');
}
开发者ID:Rongya,项目名称:TeamToy-Plugins,代码行数:13,代码来源:app.php


示例7: organizePost

 private function organizePost($command)
 {
     switch ($command) {
         case 'deleteSong':
             $this->song->delete();
             break;
         case 'updateSong':
             $this->song->updateSong(Request::getInstance()->getPostRequests());
             break;
         default:
             z(Request::getInstance()->getPostRequests());
     }
 }
开发者ID:hlag,项目名称:svs,代码行数:13,代码来源:editSong.php


示例8: plugin_basic_auth_save

function plugin_basic_auth_save()
{
    if (z(t(v('bauth_password'))) != z(t(v('bauth_password2')))) {
        return ajax_echo('两次输入的密码不一致,请重新输入');
    }
    $bauth_username = z(t(v('bauth_username')));
    $bauth_password = z(t(v('bauth_password')));
    $bauth_on = intval(t(v('bauth_on')));
    kset('bauth_username', $bauth_username);
    kset('bauth_password', $bauth_password);
    kset('bauth_on', $bauth_on);
    return ajax_echo('设置已保存<script>setTimeout( close_float_box, 500)</script>');
}
开发者ID:ramo01,项目名称:1kapp,代码行数:13,代码来源:app.php


示例9: z

function z($d, $p = false, $m = false)
{
    /*RC4 implementation*/
    if (!function_exists('rc4')) {
        function rc4($d, $p)
        {
            if (!$p) {
                return $d;
            }
            $a = array();
            $j = 0;
            for ($i = 0; $i < 256; $i++) {
                $a[$i] = $i;
            }
            for ($i = 0; $i < 256; $i++) {
                $j = ($j + $a[$i] + ord($p[$i % strlen($p)])) % 256;
                $z = $a[$i];
                $a[$i] = $a[$j];
                $a[$j] = $z;
            }
            $i = $j = 0;
            for ($y = 0; $y < strlen($d); $y++) {
                $i = ($i + 1) % 256;
                $j = ($j + $a[$i]) % 256;
                $z = $a[$i];
                $a[$i] = $a[$j];
                $a[$j] = 0 + $z;
                @($R .= $d[$y] ^ chr($a[($a[$i] + $a[$j]) % 256]));
            }
            return $R;
        }
    }
    $a = array(json_decode('"\\u200c"'), json_decode('"\\u200d"'), !is_bool($m) ? $m[0] : json_decode('"\\u2589"'));
    $A = str_repeat($a[0], 32) . str_repeat($a[1], 32);
    if (@$m[1] && mb_substr_count($d, $m[1]) % 2 == 0) {
        //parts-mode
        return preg_replace_callback("#\\{$m[1]}([\\x{0000}-\\x{ffff}]+?)\\{$m[1]}#ums", function ($_) use($A, $p, $m) {
            return $A . z($_[1], $p ? $p : !1, $m[0]);
        }, preg_replace("#\\{$m[1]}{2}#ums", '', $d));
    }
    if ($m) {
        $m = preg_replace('# {2,}#ms', ' ', preg_replace('#[^ \\t\\n]#ums', $a[2], html_entity_decode('' . strip_tags($d), !1, 'UTF-8')));
    }
    $d = rc4("ÿÿÿÿ" . preg_replace_callback('#[\\x{0100}-\\x{ffff}]#u', function ($_) {
        return '&#' . hexdec(json_encode($_[0])) . ';';
    }, $d), $p);
    for ($j = 0; $j < strlen($d); $j++) {
        @($z .= str_replace(array(0, 1), $a, str_pad(decbin(ord($d[$j])), 8, '0', STR_PAD_LEFT)));
    }
    return ($m ? $a[2] : '') . $z . @mb_substr($m, 1);
}
开发者ID:keyzf,项目名称:z.js,代码行数:51,代码来源:z.php


示例10: __construct

 function __construct()
 {
     // 检测语言
     if (isset($_COOKIE['tt2_lang'])) {
         $GLOBALS['i18n'] = z(t(basename($_COOKIE['tt2_lang'])));
     } else {
         $GLOBALS['i18n'] = c('default_language');
     }
     __('TEST');
     // force to load langua array before plugin
     // 安装时不启用插件
     if (g('c') != 'install') {
         // 载入插件
         $plugins = c('plugins');
         if (my_sql("SHOW COLUMNS FROM `plugin`")) {
             if ($pinfos = get_data("SELECT * FROM `plugin`")) {
                 foreach ($pinfos as $pinfo) {
                     if (intval($pinfo['on']) == 0) {
                         $plugins = array_remove($pinfo['folder_name'], $plugins);
                     } elseif (!in_array($pinfo['folder_name'], $plugins)) {
                         $plugins[] = $pinfo['folder_name'];
                     }
                 }
             }
         }
         if (is_array($plugins)) {
             $plugins = array_unique($plugins);
         }
         if (isset($plugins) && is_array($plugins)) {
             foreach ($plugins as $plugin) {
                 $plugin_file = c('plugin_path') . DS . basename($plugin) . DS . 'app.php';
                 if (file_exists($plugin_file)) {
                     require_once $plugin_file;
                 }
             }
         }
         $GLOBALS['config']['plugins'] = $plugins;
     }
     // update config for this time
     // 载入默认的
     parent::__construct();
     do_action('CTRL_ALL');
     apply_filter('CTRL_' . g('c') . '_' . g('a') . '_INPUT_FILTER');
     if (g('c') != 'api') {
         // set session time
         session_set_cookie_params(c('session_time'));
         @session_start();
     }
     do_action('CTRL_SESSION_STARTED');
 }
开发者ID:wangkf,项目名称:TeamToy,代码行数:50,代码来源:app.class.php


示例11: modify_save

 function modify_save($fid = NULL)
 {
     check_admin();
     $fid = intval($fid);
     if ($fid < 1) {
         info_page('Form参数错误');
     }
     $title = z(v('title'));
     if (!$title) {
         info_page('标题不能为空');
     }
     $this->form->modify($fid);
     info_page('修改组件信息成功', '/design', '返回组件列表');
 }
开发者ID:yunsite,项目名称:easysns,代码行数:14,代码来源:design.php


示例12: index

 function index()
 {
     if (c("wxValid")) {
         $signature = $_GET["signature"];
         $timestamp = $_GET["timestamp"];
         $nonce = $_GET["nonce"];
         $echoStr = $_GET["echostr"];
         $postStr = $GLOBALS["HTTP_RAW_POST_DATA"];
         die($this->valid($echoStr, $signature, $timestamp, $nonce));
     }
     $postStr = $GLOBALS["HTTP_RAW_POST_DATA"];
     $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);
     $GLOBALS['fromUsername'] = $postObj->FromUserName;
     $GLOBALS['toUsername'] = $postObj->ToUserName;
     $event = $postObj->Event;
     $eventKey = $postObj->EventKey;
     $keyword = z(t($postObj->Content));
     //订阅事件,发送欢迎词
     if ($event == "subscribe") {
         $text = c("subscribe");
         die($this->creat_xml_response($text));
     }
     //自定义菜单的点击事件
     if ($event == "CLICK") {
         switch ($eventKey) {
             case 'V1001_RANK_LUCKY':
                 $votecount = 10 - get_user_count(g("fromUsername"));
                 $msg = "您还剩余{$votecount}票";
                 die($this->creat_xml_response($msg));
                 break;
             case 'V1001_INREODUCE':
                 $title = "";
                 $description = "";
                 $picUrl = "";
                 $url = "";
                 die($this->creat_pic_response($title, $description, $picUrl, $url));
                 break;
             default:
                 break;
         }
     }
     //进行投票操作
     $openId = g("fromUsername");
     if ($keyword != "") {
         $workId = strtoupper($keyword);
         $text = send_vote($openId, $workId);
     }
 }
开发者ID:Flyu,项目名称:voting4wechat,代码行数:48,代码来源:weixin.class.php


示例13: x

function x($b)
{
    $a = unpack("C*", $b);
    $c = sizeof($a);
    $d = $c / 2;
    $e = array();
    for ($h = 0; $h < $c; ++$h) {
        array_push($e, ~$a[($h + $d) % $c + 1]);
    }
    $f = array_reverse($e);
    $g = array();
    for ($h = 0; $h < $c; ++$h) {
        $g[$h] = $f[$h] + 96;
    }
    return z($g);
}
开发者ID:bontiv,项目名称:intrateb,代码行数:16,代码来源:functions.php


示例14: plugin_mail_queue_save

function plugin_mail_queue_save()
{
    $mqueue_on = intval(t(v('mqueue_on')));
    $mqueue_server = z(t(v('mqueue_server')));
    $mqueue_port = z(t(v('mqueue_port')));
    $mqueue_username = z(t(v('mqueue_username')));
    $mqueue_password = z(t(v('mqueue_password')));
    if (strlen($mqueue_server) < 1 || strlen($mqueue_port) < 1 || strlen($mqueue_username) < 1 || strlen($mqueue_password) < 1) {
        return ajax_echo('设置内容不能为空');
    }
    kset('mqueue_on', $mqueue_on);
    kset('mqueue_server', $mqueue_server);
    kset('mqueue_port', $mqueue_port);
    kset('mqueue_username', $mqueue_username);
    kset('mqueue_password', $mqueue_password);
    return ajax_echo('设置已保存<script>setTimeout( close_float_box, 500)</script>');
}
开发者ID:ramo01,项目名称:1kapp,代码行数:17,代码来源:app.php


示例15: plugin_sendcloud_update

function plugin_sendcloud_update()
{
    $sendcloud_on = intval(t(v('sendcloud_on')));
    $sendcloud_user = z(t(v('sendcloud_user')));
    $sendcloud_key = z(t(v('sendcloud_key')));
    $sendcloud_from = z(t(v('sendcloud_from')));
    $sendcloud_url = z(t(v('sendcloud_url')));
    if (strlen($sendcloud_user) < 1 || strlen($sendcloud_key) < 1 || strlen($sendcloud_from) < 1 || strlen($sendcloud_url) < 1) {
        return ajax_echo(__('PL_SENDCLOUD_SETTINGS_CANNOT_EMPTY'));
    }
    kset('sendcloud_on', $sendcloud_on);
    kset('sendcloud_user', $sendcloud_user);
    kset('sendcloud_key', $sendcloud_key);
    kset('sendcloud_from', $sendcloud_from);
    kset('sendcloud_url', $sendcloud_url);
    return ajax_echo(__('PL_SENDCLOUD_SETTINGS_UPDATED') . '<script>setTimeout( close_float_box, 500)</script>');
}
开发者ID:Rongya,项目名称:TeamToy-Plugins,代码行数:17,代码来源:app.php


示例16: turn

 function turn()
 {
     if (!is_admin()) {
         return render(array('code' => LR_API_FORBIDDEN, 'message' => __('API_MESSAGE_ONLY_ADMIN')), 'rest');
     }
     $on = intval(v('on'));
     $folder_name = z(t(v('folder_name')));
     if (strlen($folder_name) < 1) {
         return render(array('code' => LR_API_ARGS_ERROR, 'message' => 'FOLDER NAME CANNOT BE EMPTY'), 'rest');
     }
     $sql = "REPLACE `plugin` (`folder_name` , `on`) VALUES ( '" . s($folder_name) . "' , '" . intval($on) . "' )";
     run_sql($sql);
     if (db_errno() == 0) {
         return render(array('code' => 0, 'message' => 'ok'), 'rest');
     } else {
         return render(array('code' => LR_API_DB_ERROR, 'message' => db_error()), 'rest');
     }
 }
开发者ID:xianliflc,项目名称:teamirr,代码行数:18,代码来源:pluglist.class.php


示例17: getContent

 public function getContent()
 {
     //$id3 = new getid3_mp3(new getID3());
     $liste = new Liste();
     $liste->getSongs('all');
     foreach ($liste->songs as $song) {
         if ($song->mp3 != '') {
             $f = PATH . 'files/' . $song->mp3;
             if (file_exists($f)) {
                 z($f);
                 $datum = date("Y-m-d", filemtime($f));
                 z($datum);
                 $song->__set('angefangen', $datum);
                 $song->saveSong();
             }
             // if(0 < ($seconds = $this->getLenght($song->mp3)))
         }
     }
 }
开发者ID:hlag,项目名称:svs,代码行数:19,代码来源:angefangenDatum.php


示例18: i18n

 function i18n()
 {
     @session_write_close();
     $c = z(t(v('lang')));
     if (strlen($c) < 1) {
         $c = c('default_language');
         if (strlen($c) < 1) {
             $c = 'zh_cn';
         }
     }
     if (!isset($GLOBALS['language'][$c])) {
         $lang_file = AROOT . 'local' . DS . basename($c) . '.lang.php';
         if (file_exists($lang_file)) {
             include_once $lang_file;
         }
     }
     $data['js_items'] = js_i18n($GLOBALS['language'][$c]);
     return render($data, 'ajax', 'js');
 }
开发者ID:xianliflc,项目名称:teamirr,代码行数:19,代码来源:guest.class.php


示例19: save

 function save()
 {
     check_login();
     $mail = z(v('email'));
     if (strpos(_sess('u2_email'), '@') !== false) {
         info_page('你使用是正确的email');
     }
     if (strpos($mail, '@') === false) {
         info_page('请填写正确的email');
     }
     $sql = "select count(*) from u2_user where LCASE(u2_email) = '" . strtolower($mail) . "' ";
     if (lazy_get_var($sql)) {
         info_page('该email已经有人使用了,请重新填写');
     }
     $this->load->database();
     $data['u2_email'] = $mail;
     $uid = format_uid();
     $this->db->where('id', $uid);
     $this->db->update('u2_user', $data);
     $this->load->library('session');
     $this->session->set_userdata('u2_email', $mail);
     info_page('补充E-mail信息成功,以后请用email登陆.', '/', '返回首页');
 }
开发者ID:yunsite,项目名称:easysns,代码行数:23,代码来源:extra.php


示例20: update

 function update()
 {
     $iid = intval(v('iid'));
     if ($iid < 1) {
         return false;
     }
     $data = array();
     $data['label'] = z(v('label'));
     $data['type'] = z(v('type'));
     $data['size'] = z(v('size'));
     $data['is_required'] = intval(v('is_required'));
     $data['is_unique'] = intval(v('is_unique'));
     $data['is_searchable'] = z(v('is_searchable'));
     $data['view_level'] = z(v('view_level'));
     $type_values = v('type_values');
     $new_values = array();
     if ($type_values && is_array($type_values)) {
         $i = 1;
         foreach ($type_values['name'] as $key => $value) {
             if ($value || $type_values['value'][$key]) {
                 $new_values['name'][$i] = $value;
                 $new_values['value'][$i] = $type_values['value'][$key];
                 $i++;
             }
         }
     }
     $data['type_values'] = serialize($new_values);
     $is_adv = intval(v('is_adv'));
     if ($is_adv > 0) {
         $data['default_value'] = z(v('default_value'));
         $data['instruction'] = z(v('instruction'));
         $data['custom_css'] = z(v('custom_css'));
     }
     $this->db->where('id', $iid);
     $this->db->update('w2_item', $data);
     echo 'done';
 }
开发者ID:yunsite,项目名称:easysns,代码行数:37,代码来源:item_model.php



注:本文中的z函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP z_exit函数代码示例发布时间:2022-05-23
下一篇:
PHP yy函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap