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

PHP print_a函数代码示例

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

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



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

示例1: token

 function token($options)
 {
     if ($options[0] == "thumb") {
         $sub_opts = explode("|", $options[1]);
         foreach ($sub_opts as $opt) {
             $this_opts[] = explode("=", $opt);
         }
         unset($options);
         foreach ($this_opts as $option) {
             $options[$option['0']] = $option[1];
         }
         if (isset($options['file']) && file_exists(path::file("images") . $options['file'])) {
             if (!isset($options['maxw'])) {
                 $options['maxw'] = 20000;
             } else {
                 $options['maxw'] = intval($options['maxw']);
             }
             if (!isset($options['maxh'])) {
                 $options['maxh'] = 20000;
             } else {
                 $options['maxh'] = intval($options['maxh']);
             }
             return $this->create_thumb($options['file'], $options['maxw'], $options['maxh']) . print_a($options, true);
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:wcms,代码行数:26,代码来源:Magic.php


示例2: __construct

    /**
     *
     */
    function __construct()
    {
        $html = '';
        if (!empty($_GET['debug']) && getperms('0')) {
            $debug = true;
            // For future use.
            $text = <<<TEMPL

\t[html][code]Something goes here [b]bold print[/b][/code][/html]

TEMPL;
            $_POST['content'] = $text;
            $_POST['mode'] = 'tohtml';
        } else {
            $debug = false;
        }
        if ($_POST['mode'] == 'tohtml') {
            $html = $this->toHtml($_POST['content']);
        }
        if ($_POST['mode'] == 'tobbcode') {
            $html = $this->toBBcode($_POST['content']);
        }
        if ($debug == true) {
            print_a($html);
            echo "<hr />";
            echo $html;
        } elseif ($this->gzipCompression == true) {
            header('Content-Encoding: gzip');
            $gzipoutput = gzencode($html, 6);
            header('Content-Length: ' . strlen($gzipoutput));
            echo $gzipoutput;
        } else {
            echo $html;
        }
    }
开发者ID:armpit,项目名称:e107,代码行数:38,代码来源:parser.php


示例3: debug

 function debug()
 {
     echo "<h3>Event Functions</h3>";
     print_a($this->functions);
     echo "<h3>Event Includes</h3>";
     print_a($this->includes);
 }
开发者ID:armpit,项目名称:e107,代码行数:7,代码来源:event_class.php


示例4: gitrepo

 /**
  * Update the current Repo. of this e107 installation.  (eg. e107 on github)
  */
 function gitrepo()
 {
     $mes = e107::getMessage();
     $fl = e107::getFile();
     if (is_dir(e_BASE . ".git")) {
         $gitPath = defset('e_GIT', 'git');
         // addo to e107_config.php to
         // Change Dir.
         $cmd = 'cd ' . e_ROOT;
         $mes->addDebug($cmd);
         $text = `{$cmd} 2>&1`;
         // Remove any local changes.
         $cmd = $gitPath . ' reset --hard';
         $mes->addDebug($cmd);
         $text .= `{$cmd} 2>&1`;
         // Run Pull request
         $cmd = $gitPath . ' pull';
         $mes->addDebug($cmd);
         $text .= `{$cmd} 2>&1`;
         $return = print_a($text, true);
         $mes->addSuccess($return);
         if (unlink(e_BASE . "install.php")) {
             $mes->addDebug("Removed install.php");
         }
     } else {
         $mes->addError("No git repo found");
         //TODO LAN
     }
     $fl->chmod(e_BASE . "cron.php", 0755);
     $fl->chmod(e_HANDLER . "bounce_handler.php", 0755);
 }
开发者ID:armpit,项目名称:e107,代码行数:34,代码来源:cron_class.php


示例5: smarty_modifier_printa

/**
 * print_a表示
 *
 * <pre>
 * デバック用表示(print_a)します
 *
 * Example
 * </pre>
 * <code>
 * {$body|printa}
 * </code>
 *
 * @category   BEAR
 * @package    BEAR_Smarty
 * @subpackage Plugin
 * @author     Akihito Koriyama <[email protected]>
 * @copyright  2008-2011 Akihito Koriyama  All rights reserved.
 * @license    http://opensource.org/licenses/bsd-license.php BSD
 * @version    SVN: Release: @package_version@ $Id: modifier.printa.php 2538 2011-06-12 17:37:53Z [email protected] $
 * @link       http://www.bear-project.net/
 * @param string $string 文字列
 *
 * @return $string
 */
function smarty_modifier_printa($string)
{
    if (!function_exists('print_a')) {
        include 'BEAR/vendors/debuglib.php';
    }
    $string = print_a($string, "return:true");
    return $string;
}
开发者ID:ryo88c,项目名称:BEAR.Saturday,代码行数:32,代码来源:modifier.printa.php


示例6: outputPrint

/**
 * 変数画面出力
 *
 * @param array $values  値
 * @param array $options オプション
 *
 * @return BEAR_Ro
 */
function outputPrint($values, array $options)
{
    $body = print_a($values, 'return:1');
    $headers = array('X-BEAR-Output: PRINT' => 'Content-Type: text/html; charset=utf-8');
    $ro = BEAR::factory('BEAR_Ro');
    $ro->setBody($body);
    $ro->setHeaders($headers);
    return $ro;
}
开发者ID:ryo88c,项目名称:BEAR.Saturday,代码行数:17,代码来源:print.php


示例7: process

 /**
  * Process Posted Data.
  * @param $ui admin-ui object
  */
 public function process($ui, $id = 0)
 {
     $data = $ui->getPosted();
     $action = $ui->getAction();
     // current mode: create, edit, list
     //e107::getHybridAuth('twitter');
     e107::getMessage()->addDebug("e107_plugins/social/e_admin.php :: process method called.");
     e107::getMessage()->addDebug("ID: " . $id);
     e107::getMessage()->addDebug("Action: " . $action);
     e107::getMessage()->addDebug(print_a($data, true));
 }
开发者ID:armpit,项目名称:e107,代码行数:15,代码来源:e_admin.php


示例8: d

 /**
  * Outputs a debug message, and optionally a variable's content.
  *
  * @param string $msg Message to output.
  * @param mixed $var Variable to be shown.
  */
 function d($msg, $var = NULL)
 {
     echo '<span>Debug: ' . nl2br($msg) . '</span><br>';
     if (!is_null($var)) {
         if (is_array($var)) {
             print_a($var, 0, TRUE);
         } else {
             print_a(array(gettype($var) => $var), 0, TRUE);
         }
     }
 }
开发者ID:JAMNConsultoria,项目名称:cataforte,代码行数:17,代码来源:debug.php


示例9: __construct

 function __construct()
 {
     $mes = e107::getMessage();
     $frm = e107::getForm();
     $tp = e107::getParser();
     //	$this->simulation();
     $mailoutPlugins = e107::getConfig()->get('e_mailout_list');
     if (empty($_GET['id'])) {
         return;
     }
     $tmp = base64_decode($_GET['id']);
     parse_str($tmp, $data);
     $data['plugin'] = $tp->filter($data['plugin'], 'str');
     $data['email'] = $tp->filter($data['email'], 'email');
     e107::getMessage()->addDebug(print_a($data, true));
     $plugin = vartrue($data['plugin'], false);
     if (empty($data) || !e107::isInstalled($plugin) || !in_array($plugin, $mailoutPlugins)) {
         $this->invalidURL();
         return;
     }
     $ml = e107::getAddon($plugin, 'e_mailout');
     if (!empty($data['userclass'])) {
         $data['userclass'] = intval($data['userclass']);
         $listName = e107::getUserClass()->getName($data['userclass']);
     } else {
         $listName = $ml->mailerName;
     }
     if (vartrue($_POST['remove']) && !empty($data)) {
         if ($ml->unsubscribe('process', $data) != false) {
             $text = "<p><b>" . $data['email'] . "</b> has been removed from " . $listName . ".</p>";
             $mes->addSuccess($text);
         } else {
             $text = "<p>There was a problem when attempting to remove <b>" . $data['email'] . "</b> from " . $listName . ".</p>";
             $mes->addError($text);
         }
         echo "<div class='container'>" . $mes->render() . "</div>";
         return;
     }
     if ($ml->unsubscribe('check', $data) != false) {
         $text = "<p>We are very sorry for the inconvenience. <br />Please click the button below to remove <b>" . $data['email'] . "</b> from <i>" . $listName . "</i>.</p>";
         $text .= $frm->open('unsub', 'post', e_REQUEST_URI);
         $text .= $frm->button('remove', 'Remove ', 'submit');
         $text .= $frm->close();
         $mes->setTitle('Unsubscribe', E_MESSAGE_INFO)->addInfo($text);
         echo "<div class='container'>" . $mes->render() . "</div>";
         return;
     } else {
         $this->invalidURL();
         return;
     }
 }
开发者ID:armpit,项目名称:e107,代码行数:51,代码来源:unsubscribe.php


示例10: sc_featurebox

 /**
  * Available parameters (GET string format)
  * - cols (integer): number of items per column, default 1
  * - no_fill_empty (boolean): don't fill last column with empty items (if required), default 0
  * - tablestyle (string): mode to be used with <code>tablerender()</code>, default 'featurebox'
  * - notablestyle (null): if isset - disable <code>tablerender()</code>
  * - force (boolean): force category model load , default false
  * - ids (string): comma separated id list - load specific featurebox items, default empty 
  * 
  * @param string $parm parameters
  * @param string $mod category template
  * @example {FEATUREBOX=cols=2|tabs}
  */
 function sc_featurebox($parm = null, $mod = '')
 {
     if ($parm == null && $mod == '') {
         $type = vartrue(e107::getPlugPref('featurebox', 'menu_category'), 'bootstrap_carousel');
         $text = e107::getParser()->parseTemplate("{FEATUREBOX|" . $type . "}");
         return $text;
     }
     // TODO cache
     if (!e107::isInstalled('featurebox')) {
         return '';
     }
     if (!$mod) {
         $ctemplate = 'default';
     } else {
         $ctemplate = $mod;
     }
     parse_str($parm, $parm);
     $category = $this->getCategoryModel($ctemplate, vartrue($parm['force']) ? true : false);
     $defopt = array('force' => 0, 'no_fill_empty' => 0, 'tablestyle' => 'featurebox', 'cols' => 1, 'ids' => '', 'notablestyle' => null);
     // reset to default, update current
     $category->setParams($defopt)->updateParams($parm);
     if (!$category->hasData()) {
         return '';
     }
     $tmpl = $this->getFboxTemplate($ctemplate);
     $type = vartrue($tmpl['js_type'], '');
     // Legacy support (prototype.js)
     if (vartrue($tmpl['js'])) {
         $tmp = explode(',', $tmpl['js']);
         foreach ($tmp as $file) {
             e107::js('footer', $file, $type);
         }
     }
     $tp = e107::getParser();
     if (vartrue($tmpl['js_inline'])) {
         $data = $tp->toText($category->getData('fb_category_parms'));
         $jsInline = str_replace("{FEATUREBOX_PARMS}", "{" . trim($data) . "}", $tmpl['js_inline']);
         e107::js('footer-inline', $jsInline, $type, 3);
     }
     // Fix - don't use tablerender if no result (category could contain hidden items)
     $ret = $this->render($category, $ctemplate, $parm);
     if (empty($ret)) {
         e107::getMessage()->addDebug('Featurebox returned nothing.')->addDebug('Category: ' . print_a($category, true))->addDebug('Template: ' . $ctemplate)->addDebug('Param: ' . print_a($parm, true));
         return '';
     }
     $ret = $tp->parseTemplate($tmpl['list_start'], true, $category) . $ret . $tp->parseTemplate($tmpl['list_end'], true, $category);
     if (isset($parm['notablestyle'])) {
         return $ret;
     }
     return e107::getRender()->tablerender(LAN_PLUGIN_FEATUREBOX_NAME, $ret, vartrue($parm['tablestyle'], 'featurebox'), true);
 }
开发者ID:armpit,项目名称:e107,代码行数:64,代码来源:e_shortcode.php


示例11: init

 function init()
 {
     if (!empty($_POST['version'])) {
         $this->version = $_POST['version'];
     }
     if (!empty($_POST['baseUrl'])) {
         $this->baseUrl = $_POST['baseUrl'];
     }
     if (!empty($_POST['basePath'])) {
         $this->basePath = $_POST['basePath'];
     }
     if (!empty($_POST)) {
         e107::getMessage()->addDebug(print_a($_POST, true));
     }
 }
开发者ID:armpit,项目名称:e107,代码行数:15,代码来源:drupal_import_class.php


示例12: actionTest

 public function actionTest()
 {
     echo 'Login controller<br /><br />';
     if (isset($_GET['lgt'])) {
         e107::getUser()->logout();
     }
     echo 'Logged in: ' . (e107::getUser()->isUser() ? 'true' : 'false');
     $provider = e107::getUser()->getProvider();
     if ($provider) {
         print_a($provider->getUserProfile());
     }
     echo '<br /><br /><a href="' . e107::getUrl()->create('system/xup/test?lgt') . '">Test logout</a>';
     echo '<br /><a href="' . e107::getUrl()->create('system/xup/login?provider=Facebook') . '">Test login with Facebook</a>';
     echo '<br /><a href="' . e107::getUrl()->create('system/xup/signup?provider=Facebook') . '">Test signup with Facebook</a>';
 }
开发者ID:notzen,项目名称:e107,代码行数:15,代码来源:xup.php


示例13: render2

 function render2()
 {
     $mes = e107::getMessage();
     $admin_cat = e107::getNav()->adminCats();
     $text = "<div class='center'>\n        \t   \n        \t\t\t<ul class='nav nav-tabs'>";
     foreach ($admin_cat['id'] as $cat_key => $cat_id) {
         // $text .= "<li id='tab-main_".$cat_key."' ><span style='white-space:nowrap'><img class='icon S16' src='".$admin_cat['img'][$cat_key]."' alt='' style='margin-right:3px' /><a href='#core-main_".$cat_key."'>".$admin_cat['title'][$cat_key]."</a></span></li>";
         $text .= "<li id='tab-main_" . $cat_key . "' ><a data-toggle='tab' href='#core-main_" . $cat_key . "'>" . $admin_cat['title'][$cat_key] . "</a></li>";
     }
     $text .= "</ul>";
     $text .= "<div id='tab-content'>";
     print_a($admin_cat);
     foreach ($admin_cat['id'] as $cat_key => $cat_id) {
         $text_check = FALSE;
         $text_cat = "";
         if ($cat_key != 5) {
             foreach ($newarray as $key => $funcinfo) {
                 if ($funcinfo[4] == $cat_key) {
                     $text_rend = e107::getNav()->renderAdminButton($funcinfo[0], $funcinfo[1], $funcinfo[2], $funcinfo[3], $funcinfo[6], 'div');
                     if ($text_rend) {
                         $text_check = TRUE;
                     }
                     $text_cat .= $text_rend;
                 }
             }
         } else {
             $text_rend = e107::getNav()->pluginLinks(E_32_PLUGMANAGER, "div");
             if ($text_rend) {
                 $text_check = TRUE;
             }
             $text_cat .= $text_rend;
         }
         //$text_cat .= render_clean();
         if ($text_check) {
             $text .= "<div class='tab-pane adminform' id='core-main_" . $cat_key . "'>\n";
             $text .= " <div class='main_caption bevel'><b>" . $admin_cat['title'][$cat_key] . "</b></div>";
             $text .= $text_cat;
             $text .= "</div><!-- End tab-pane -->";
         }
     }
     $text .= "</div></div>";
     $ns->tablerender(ADLAN_47 . " " . ADMINNAME, $mes->render() . $text);
 }
开发者ID:armpit,项目名称:e107,代码行数:43,代码来源:tabbed.php


示例14: init

 public function init()
 {
     if (e_AJAX_REQUEST) {
         $tp = e107::getParser();
         if (!empty($_POST['pk']) && !empty($_POST['value'])) {
             $cfg = e107::getConfig();
             list($plug, $key) = explode("|", $_POST['pk']);
             if (is_string($cfg->get('e_url_alias'))) {
                 $cfg->setPostedData('e_url_alias', array(e_LAN => array($plug => array($key => $tp->filter($_POST['value'])))), false);
             } else {
                 $cfg->setPref('e_url_alias/' . e_LAN . '/' . $plug . "/" . $key, $tp->filter($_POST['value']));
             }
             $cfg->save(true, true, true);
         }
         //	file_put_contents(e_LOG."e_url.log", print_r($cfg->get('e_url_alias'),true));
         exit;
     }
     $htaccess = file_exists(e_BASE . ".htaccess");
     if (function_exists('apache_get_modules')) {
         $modules = apache_get_modules();
         $modRewrite = in_array('mod_rewrite', $modules);
     } else {
         $modRewrite = true;
         //we don't really know.
     }
     if ($modRewrite === false) {
         e107::getMessage()->addInfo("Apache mod_rewrite was not found on this server and is required to use this feature. ");
         e107::getMessage()->addDebug(print_a($modules, true));
     }
     if ($htaccess && $modRewrite && !deftrue('e_MOD_REWRITE')) {
         e107::getMessage()->addInfo("Mod-rewrite is disabled. To enable, please add the following line to your <b>e107_config.php</b> file:<br /><pre>define('e_MOD_REWRITE',true);</pre>");
     }
     if (is_array($_POST['rebuild'])) {
         $table = key($_POST['rebuild']);
         list($primary, $input, $output) = explode("::", $_POST['rebuild'][$table]);
         $this->rebuild($table, $primary, $input, $output);
     }
     $this->api = e107::getInstance();
     $this->addTitle(LAN_EURL_NAME);
     if ($this->getAction() != 'settings') {
         return;
     }
 }
开发者ID:KonzolozZ,项目名称:e107,代码行数:43,代码来源:eurl.php


示例15: onInit

    /**
     * 初期化
     *
     * @return void
     */
    public function onInit(array $args)
    {
        $q = $args['q'];
        $argv = explode(' ', $q);
        switch (true) {
            case $q == 'help':
                $help = <<<END
Commands:
  clear        clear screen
  config       show application configulation.
  info         show server info.
  bear         bear command, type bear -h for more info.
END;
                $this->_ajax->addAjax('js', array('shell' => "<pre>{$help}</pre>"));
                break;
            case $q == 'clear':
                $this->_ajax->addAjax('js', array('clear' => ''));
                break;
            case $q == 'config':
                $app = BEAR::get('app');
                $info = '<strong>app<strong><br />' . print_a($app, 'return:1');
                $this->_ajax->addAjax('js', array('shell' => $info));
                break;
            case $q == 'info':
                $info = '<strong>$_SERVER<strong><br />';
                $info .= print_a($_SERVER, 'return:1');
                $info .= '<strong>$_ENV<strong><br />';
                $info .= print_a($_ENV, 'return:1');
                $info .= '<strong>$_COOKIE<strong><br />';
                $info .= print_a($_COOKIE, 'return:1');
                $this->_ajax->addAjax('js', array('shell' => $info));
                break;
            case isset($argv[0]) && $argv[0] === 'bear':
                //bearコマンド
                $this->_shell($argv);
                break;
            default:
                $this->_ajax->addAjax('js', array('shell' => "BEAR: {$argv[0]}: Command not found<br/>"));
                break;
        }
    }
开发者ID:ryo88c,项目名称:BEAR.Saturday,代码行数:46,代码来源:shell.php


示例16: actionTest

 public function actionTest()
 {
     echo '<h3>Social Login Tester</h3>';
     if (getperms('0')) {
         echo e107::getMessage()->addError("Please logout of e107 before testing the new-user login/signup procedure.")->render();
         return;
     }
     if (isset($_GET['lgt'])) {
         e107::getUser()->logout();
     }
     $profileData = null;
     $provider = e107::getUser()->getProvider();
     if ($provider) {
         $profileData = $provider->getUserProfile();
         if (!empty($profileData)) {
             print_a($profileData);
         }
     }
     echo 'Logged in: ' . (e107::getUser()->isUser() && !empty($profileData) ? '<span class="label label-success">true</span>' : '<span class="label label-danger">false</span>');
     $testUrl = SITEURL . "?route=system/xup/test";
     $providers = e107::getPref('social_login', array());
     foreach ($providers as $key => $var) {
         if ($var['enabled'] == 1) {
             echo '<h3>' . $key . '</h3><ul>';
             echo '<li><a class="btn btn-default" href="' . e107::getUrl()->create('system/xup/login?provider=' . $key . '&back=' . base64_encode($testUrl)) . '">Test login only with ' . $key . '</a></li>';
             echo '<li><a class="btn btn-default" href="' . e107::getUrl()->create('system/xup/signup?provider=' . $key . '&back=' . base64_encode($testUrl)) . '">Test signup/login with ' . $key . '</a></li>';
             echo "</ul>";
         }
         //	print_a($var);
     }
     echo '<br /><br /><a class="btn btn-default" href="' . e107::getUrl()->create('system/xup/test?lgt') . '">Test logout</a>';
     /*
     		echo '<h3>Facebook</h3>';
     		echo '<br /><a href="'.e107::getUrl()->create('system/xup/login?provider=Facebook').'">Test login with Facebook</a>';
     		echo '<br /><a href="'.e107::getUrl()->create('system/xup/signup?provider=Facebook').'">Test signup with Facebook</a>';
     		
     		echo '<h3>Twitter</h3>';
     		echo '<br /><a href="'.e107::getUrl()->create('system/xup/login?provider=Twitter').'">Test login with Twitter</a>';
     		echo '<br /><a href="'.e107::getUrl()->create('system/xup/signup?provider=Twitter').'">Test signup with Twitter</a>';
     */
 }
开发者ID:armpit,项目名称:e107,代码行数:41,代码来源:xup.php


示例17: get_field

 function get_field($field, $where_field, $where_value, $debug = FALSE)
 {
     $this->db->select($field)->from($this->table)->where($where_field, $where_value);
     $query_db = $this->db->get();
     if ($debug) {
         print_a('Arguments~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
         print_a($field);
         print_a($where_field);
         print_a($where_value);
         print_a('SQL returned handle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
         print_a($query_db);
         print_a('DB data~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
         print_a($query_db->row_array());
     } else {
         if ($query_db->num_rows) {
             $results = $query_db->row_array();
             return $results[$field];
         }
         return FALSE;
     }
 }
开发者ID:pay1bux,项目名称:site-pc,代码行数:21,代码来源:MY_Model.php


示例18: print_a

/**
 * print_a()
 *
 * Funktion um ein Array optisch darzustellen
 * @author designerscripte.net
 * @category system
 * @version 2.5.0
 * @param array $TheArray Array
 * @return echo optisch dargestelltes array
 */
function print_a($TheArray)
{
    // Note: the function is recursive
    echo '<table border=1 cellpadding=1 style="border-collapse: collapse; font: 8pt Arial;">' . "\n";
    $Keys = array_keys($TheArray);
    foreach ($Keys as $OneKey) {
        echo '<tr>' . "\n";
        echo '<td bgcolor="#727450" style="color: #ededed;">' . "\n";
        echo '<B>' . $OneKey . '</B>';
        echo '</td>' . "\n";
        echo '<td bgcolor="#C4C2A6">' . "\n";
        if (is_array($TheArray[$OneKey])) {
            print_a($TheArray[$OneKey]);
        } else {
            echo $TheArray[$OneKey];
        }
        echo '</td>' . "\n";
        echo '</tr>' . "\n";
    }
    echo '</table>' . "\n";
}
开发者ID:Duergy,项目名称:DMSone,代码行数:31,代码来源:extras.lib.php


示例19: print_a

function print_a($TheArray)
{
    // Note: the function is recursive
    echo "<table border=0 cellspacing=1 cellpadding=1>\n";
    $Keys = array_keys($TheArray);
    foreach ($Keys as $OneKey) {
        echo "<tr>\n";
        echo "<td bgcolor='#AAAAAA' valign='top'>";
        echo "<B>" . $OneKey . "</B>";
        echo "</td>\n";
        echo "<td bgcolor='#EEEEEE' valign='top'>";
        if (is_array($TheArray[$OneKey])) {
            print_a($TheArray[$OneKey]);
        } else {
            echo str_replace("\n", "<br>\n", $TheArray[$OneKey]);
        }
        echo "</td>\n";
        echo "</tr>\n";
    }
    echo "</table>\n";
}
开发者ID:bffmm1,项目名称:gmailcommunity,代码行数:21,代码来源:misc.php


示例20: productList

 /**
  * Get All Products By Filter.
  * For Product list page.
  * @param Request $request
  * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
  * @author Vini Dubey
  * @since 29-04-2016
  */
 public function productList(Request $request)
 {
     //        $postData = $request->all();
     //        echo'<pre>';print_r("hgjkgy");die("Fchg");
     //        print_r($_GET['cc']);die("Fchg");
     $objCurl = CurlRequestHandler::getInstance();
     $mytoken = env("API_TOKEN");
     //        $url = env("API_URL") .'/'. "product-ajax-handler";
     //        $data = array('api_token' => $mytoken,'method' => 'product-filter-option');
     //        $curlResponse = $objCurl->curlUsingPost($url, $data);
     //        if ($curlResponse) {
     //            return view('Product.Views.productList', ['productFilterData' => $curlResponse->data]);
     //        }
     $url = env("API_URL") . '/' . "product-list";
     $user_id = '';
     if (Session::has('fs_customer')) {
         $user_id = Session::get('fs_customer')['id'];
     }
     $subcategoryName = urlencode($request->input('subcatName'));
     $categoryName = urlencode($request->input('catName'));
     $option = $request->input('option');
     $limit = 6;
     $pageNumber = $request->input('pageNumber');
     $priceRangeFrom = $request->input('priceRangeFrom');
     $priceRangeUpto = $request->input('priceRangeUpto');
     $gender = $request->input('gender');
     $sortBy = $request->input('sort_by');
     $data = array('api_token' => $mytoken, 'id' => $user_id, 'subcategory_name' => $subcategoryName, 'category_name' => $categoryName, 'option' => $option, 'limit' => $limit, 'page_number' => 1, 'price_range_from' => $priceRangeFrom, 'price_range_upto' => $priceRangeUpto, 'sort_by' => $sortBy);
     //        $data = array('api_token' => $mytoken, 'id' => 1, 'subcategory_name' => $subcategoryName, 'category_name' => $categoryName,
     //            'option' => 1, 'limit' => $limit, 'page_number' => 1);
     //       echo'<pre>';print_r($data);die("fch");
     //        $data = array('api_token' => $mytoken, 'id' => 1,'subcategory_name' => "Women's Clothing", 'category_name' => "Apparel",
     //            'option' => 1, 'limit' => 6, 'page_number' => 1, 'price_range_from' => 500,
     //            'price_range_upto'=> 13000, 'sort_by' => "price-desc");
     $curlResponse = $objCurl->curlUsingPost($url, $data);
     print_a($curlResponse);
     if ($curlResponse) {
         return view('Product.Views.productList', ['productList' => $curlResponse->data]);
     }
 }
开发者ID:sumitglobussoft,项目名称:Flash-Sale-Ecommerce-Portal-PHP,代码行数:48,代码来源:ProductController.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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