当前位置: 首页>>代码示例>>PHP>>正文


PHP pre函数代码示例

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


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

示例1: get_data_by_stats

 function get_data_by_stats($ws = false)
 {
     $ws_sql = $ws !== false ? " wa_status='" . $ws . "'" : "";
     $sql = "SELECT * FROM (\n\t\t\t\t\tSELECT count(idx) as total, propinsi, (\n\t\t\t\t\t\tCASE \n\t\t\t\t\t\t\tWHEN (wa_status=0) \n\t\t\t\t\t\t\tTHEN 'In Progress' \n\t\t\t\t\t\t\tWHEN (wa_status=1) \n\t\t\t\t\t\t\tTHEN 'Teregistrasi' \n\t\t\t\t\t\t\tWHEN (wa_status=2) \n\t\t\t\t\t\t\tTHEN 'Terverifikasi' \n\t\t\t\t\t\t\tELSE 'Tersertifikasi'  \n\t\t\t\t\t\tEND\n\t\t\t\t\t\t) AS wa_status\n\t\t\t\t\t\tFROM \n\t\t\t\t\t\t\tv_wa_data\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t" . $ws_sql . "\n\t\t\t\t\t\tGROUP BY \n\t\t\t\t\t\t\tpropinsi,wa_status\n\t\t\t\t\t) stats\n\t\t\t\tORDER BY total";
     $arrData = $this->conn->GetAll($sql);
     pre($arrData);
 }
开发者ID:TrinataBhayanaka,项目名称:damkar,代码行数:7,代码来源:stats.php

示例2: Example_Ajax

 function Example_Ajax()
 {
     global $page, $addonRelativeCode;
     //prepare the page
     $page->head_js[] = $addonRelativeCode . 'static/02_script.js';
     $page->admin_js = true;
     //get request parameters and execute any commands
     $string = '';
     if (isset($_REQUEST['string'])) {
         $string = $_REQUEST['string'];
     }
     $cmd = common::GetCommand();
     switch ($cmd) {
         case 'randomstring':
             $string = common::RandomString(10);
             break;
     }
     //display the form
     echo '<h2>Example Ajax Requests</h2>';
     echo '<form method="post" action="' . $page->title . '">';
     echo 'Text: <input type="text" name="string" value="' . htmlspecialchars($string) . '" size="30" />';
     echo ' <input type="submit" class="gpajax" value="Post Form Asynchronosly" /> ';
     echo common::Link($page->title, 'Get Random String', 'cmd=randomstring', 'name="gpajax"');
     echo '</form>';
     //output the $_REQUEST variable
     echo '<h3>Request</h3>';
     echo pre($_REQUEST);
     //plugin example navigation
     gpPlugin::incl('navigation.php');
     PluginExampleNavigation();
 }
开发者ID:VTAMAGNO,项目名称:gpEasy-CMS,代码行数:31,代码来源:02_Ajax.php

示例3: img

 public function img()
 {
     $u_dados = $this->_upload();
     pre($u_dados);
     if ($u_dados->cod == 999) {
         echo '<img title="' . $u_dados->client_name . '" alt="' . $u_dados->client_name . '" src="' . base_url('imagens/' . $u_dados->name) . '" />';
     }
 }
开发者ID:BGCX067,项目名称:fabrica-pinheiro-svn-to-git,代码行数:8,代码来源:blogs_imagem.php

示例4: prj

function prj($input, $exit = false)
{
    if (is_string($input)) {
        $input = json_decode($input);
    }
    $input = json_encode($input, JSON_PRETTY_PRINT);
    pre($input, $exit);
}
开发者ID:graphcommons,项目名称:graphcommons-php7,代码行数:8,代码来源:test-inc.php

示例5: dump

 public static function dump($data, $dumptoScreen = false)
 {
     if ($dumptoScreen) {
         pre($data);
         die;
     }
     self::add_message('<xmp>' . print_r($data, 1) . '</xmp>');
 }
开发者ID:ehliyetsinavsorulari,项目名称:ehliyetsinavsorulari,代码行数:8,代码来源:view.php

示例6: execute

 public function execute()
 {
     $url = Config::getInstance()->get('interior.server_url');
     $connection = new Connection($url);
     $connection->usePost(false);
     pre($connection->get('knowledgepoint.get', array(), true));
     exit;
 }
开发者ID:RUSHUI,项目名称:course-offcn-php-framework,代码行数:8,代码来源:test.action.php

示例7: test_db

 public function test_db()
 {
     //$conn=$this->conn;
     $conn = get_db_config("esirs");
     $conn->debug = true;
     $sql = "select * from airport";
     $arr = $conn->GetAll($sql);
     pre($arr);
 }
开发者ID:TrinataBhayanaka,项目名称:damkar,代码行数:9,代码来源:welcome.php

示例8: test_action

 public function test_action()
 {
     if ($this->user->logged()) {
         pre($this->user->data());
     }
     if ($this->user->request_recovery($this->uri->segment(3))) {
         echo $this->uri->segment(3);
     }
 }
开发者ID:jrmiranda,项目名称:PHP-Framework,代码行数:9,代码来源:login.php

示例9: transform

 public function transform($value)
 {
     pre($value);
     exit;
     if ($value === null) {
         return '';
     }
     return $value->getId();
 }
开发者ID:RSSfeed,项目名称:AdminBundle,代码行数:9,代码来源:EntityToEntityIdTransformer.php

示例10: query

 public function query($sql, array $params = array())
 {
     if (isset($_SESSION) && $_SESSION["debug"]) {
         pre($sql);
         pre($params);
     }
     $this->model->exec($sql, $params);
     return $this;
 }
开发者ID:Vbyec,项目名称:frame,代码行数:9,代码来源:controller_mysql.php

示例11: code_action

 public function code_action()
 {
     $code = $this->uri->segment(2);
     $user = $this->user->check_recovery($code);
     if ($user) {
         pre($user);
     } else {
         echo "asd";
     }
 }
开发者ID:jrmiranda,项目名称:PHP-Framework,代码行数:10,代码来源:recovery.php

示例12: test

 function test()
 {
     echo $_SERVER['SERVER_ADDR'];
     die;
     $this->load->model('Order_model', 'order');
     //$rs=  $this->order->details(8);
     $rs = $this->order->get_all_chield_order(12);
     pre($rs);
     //pre(unserialize(base64_decode($rs[0]->orderInfo)));
 }
开发者ID:ak826843,项目名称:tidiit,代码行数:10,代码来源:tidiit_debug.php

示例13: ae_send_admin_email

 function ae_send_admin_email($post_id)
 {
     $to = 'prajwal_stha@yahoo.com';
     $subject = 'A new post has been dropped.';
     $message = "Please Assign the editor to review the post: " . get_permalink($post_id);
     $send = wp_mail($to, $subject, $message);
     if ($send) {
         pre('sent');
     }
     pre('not sent');
 }
开发者ID:prajwalstha123,项目名称:article-editor,代码行数:11,代码来源:class-article-editor-fn.php

示例14: main

 public function main()
 {
     $this->model->id = 1;
     // get from request
     $book = $this->model->find();
     pre($book);
     $books = $this->model->findAll();
     $books = $this->model->findAll('id > ?', [0]);
     pre($books);
     // $this->view('main');
     // $this->view->display('main');
 }
开发者ID:froq,项目名称:froq-beta-archive,代码行数:12,代码来源:BookService~.php

示例15: getUserInfo

    /**
     * @param $user_id
     * @return array|null
     */
    public function getUserInfo($user_id)
    {
        $sql = <<<SQL
SELECT * FROM {@auth_table} AS a LEFT JOIN {@profile_table} AS p ON a.`id` = p.`id` WHERE a.`id` = :id
SQL;
        $auth_table = UserAuthModel::getTableName();
        $profile_table = UserProfileModel::getTableName();
        $sql = strtr($sql, array('{@auth_table}' => $auth_table, '{@profile_table}' => $profile_table));
        pre($sql, false);
        $query = $this->getSelectQuery($sql, array(':id' => $user_id));
        return $query->getRow();
    }
开发者ID:aeshion,项目名称:ZeroPHP,代码行数:16,代码来源:UserDatabase.php


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