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

PHP out函数代码示例

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

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



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

示例1: getTableNameOptions

 function getTableNameOptions()
 {
     $options = array();
     $stmts = sqlStatement("SHOW TABLES");
     for ($iter = 0; $row = sqlFetchArray($stmts); $iter++) {
         foreach ($row as $key => $value) {
             array_push($options, array("id" => out($value), "label" => out(xl($value))));
         }
     }
     return $options;
 }
开发者ID:katopenzz,项目名称:openemr,代码行数:11,代码来源:RuleCriteriaDatabaseCustom.php


示例2: render_chat_messages

/**
 * Render the div full of chat messages.
 * @param $chatlength Essentially the limit on the number of messages.
**/
function render_chat_messages($chatlength, $show_elipsis = null)
{
    // Eventually there might be a reason to abstract out get_chats();
    $sql = new DBAccess();
    $sql->Query("SELECT sender_id, uname, message, age(now(), date) as ago FROM chat join players on chat.sender_id = player_id ORDER BY chat_id DESC LIMIT {$chatlength}");
    // Pull messages
    $chats = $sql->fetchAll();
    $message_rows = '';
    $messageCount = $sql->QueryItem("select count(*) from chat");
    if (!isset($show_elipsis) && $messageCount > $chatlength) {
        $show_elipsis = true;
    }
    $res = "<div class='chatMessages'>";
    $previous_date = null;
    $skip_interval = 3;
    // minutes
    foreach ($chats as $messageData) {
        $l_ago = time_ago($messageData['ago'], $previous_date);
        $message_rows .= "<li>&lt;<a href='player.php?player_id={$messageData['sender_id']}'\n\t\t     target='main'>{$messageData['uname']}</a>&gt; " . out($messageData['message']) . " <span class='chat-time'>{$l_ago}</span></li>";
        $previous_date = $messageData['ago'];
        // Store just prior date.
    }
    $res .= $message_rows;
    if ($show_elipsis) {
        // to indicate there are more chats available
        $res .= ".<br>.<br>.<br>";
    }
    $res .= "</div>";
    return $res;
}
开发者ID:ninjajerry,项目名称:ninjawars,代码行数:34,代码来源:lib_chat.php


示例3: __destruct

 function __destruct()
 {
     out($this->Comment);
     // this line doesn't crash PHP
     out("\n<!-- End Section: " . $this->Comment . "-->");
     // this line
 }
开发者ID:badlamer,项目名称:hhvm,代码行数:7,代码来源:bug24635.php


示例4: uninstall

 public function uninstall()
 {
     out(_("Removing Settings table"));
     $sql = "DROP TABLE IF EXISTS miscdests";
     $q = $this->db->prepare($sql);
     $q->execute();
 }
开发者ID:ringfreejohn,项目名称:pbxframework,代码行数:7,代码来源:Miscdests.class.php


示例5: generic_error

function generic_error($error = 'unspecified')
{
    global $session;
    header('503 Unavailable');
    $session->log(sprintf('JSON API error: "%s"', print_r($error, true)));
    out(array('error' => $error));
}
开发者ID:RDash21,项目名称:fearqdb,代码行数:7,代码来源:api.php


示例6: showHelp

function showHelp()
{
    global $argv;
    out("USAGE:");
    out("  " . $argv[0] . " --create|delete --exten <extension> [optional parameters]");
    out("");
    out("OPERATIONS (exactly one must be specified):");
    out("  --create, -c");
    out("      Create a new extension");
    out("  --modify, -m");
    out("      Modify an existing extension, the extension must exist and all values execept");
    out("      those specified will remain the same");
    out("  --delete, -d");
    out("      Delete an extension");
    out("PARAMETERS:");
    out("  --exten extension_number");
    out("      Extension number to create or delete. Must be specified.");
    out("OPTIONAL PARAMETERS:");
    out("  --name name");
    out("      Display Name, defaults to specified extension number.");
    out("  --outboundcid cid_number");
    out("      Outbound CID Number, defaults to specified extension number.");
    out("  --directdid did_number");
    out("      Direct DID Number, defaults to extension number.");
    out("  --vm-password password");
    out("      Voicemail Password, defaults to specified extension number.");
    out("  --sip-secret secret");
    out("      SIP Secret, defaults to md5 hash of specified extension number.");
    out("  --debug");
    out("      Display debug messages.");
    out("  --no-warnings");
    out("      Do Not display warning messages.");
    out("  --help, -h, -?           Show this help");
}
开发者ID:carriercomm,项目名称:Freeside,代码行数:34,代码来源:build_exten.php


示例7: install

function install($rootFolder)
{
    out('Installing');
    chdir("{$rootFolder}/htdocs");
    getFile("{$rootFolder}/htdocs/dashboard.php", "https://raw.github.com/gist/1512137/dashboard.php");
    return true;
}
开发者ID:GusTheSadGeek,项目名称:dashboard,代码行数:7,代码来源:install.php


示例8: need_user

function need_user()
{
    if (!$_SESSION['user'] && !$_SESSION['extension']) {
        echo out(array("success" => false, "message" => "User is undefined"));
        exit;
    }
}
开发者ID:komunikator,项目名称:komunikator,代码行数:7,代码来源:util.php


示例9: log

 private function log($message)
 {
     if ($this->output) {
         $this->output->writeln($message);
     } else {
         out($message);
     }
 }
开发者ID:nriendeau,项目名称:framework,代码行数:8,代码来源:installer.class.php


示例10: renderFileName

function renderFileName($fN)
{
    global $input;
    $f = pathinfo($input . $fN);
    out($f['basename'], "Rendered", "Rendering", "\r");
    renderFile($f['basename']);
    out($f['basename'] . ' as ' . $f['filename'] . '.html', "Rendered");
}
开发者ID:RSully,项目名称:render.php,代码行数:8,代码来源:render.php


示例11: out

 protected function out($data=array(),$code=0,$msg='',$type=0,$outType='',$out=true)
 {
     if(!$outType)
     {
         $outType = $this->DEFAULT_OUT_TYPE;
     }
     out($data,$code,$msg,$type,$outType,$out);
 }
开发者ID:selecterskyphp,项目名称:appstore,代码行数:8,代码来源:CommonBase.class.php


示例12: getListOptions

function getListOptions($list_id)
{
    $options = array();
    $sql = sqlStatement("SELECT option_id, title from list_options WHERE list_id = ?", array($list_id));
    for ($iter = 0; $row = sqlFetchArray($sql); $iter++) {
        $options[] = new Option(out($row['option_id']), out(xl_list_label($row['title'])));
    }
    return $options;
}
开发者ID:katopenzz,项目名称:openemr,代码行数:9,代码来源:ui.php


示例13: framework_print_errors

function framework_print_errors($src, $dst, $errors)
{
    out("error copying files:");
    out(sprintf(_("'cp -rf' from src: '%s' to dst: '%s'...details follow"), $src, $dst));
    freepbx_log(FPBX_LOG_ERROR, sprintf(_("framework couldn't copy file to %s"), $dst));
    foreach ($errors as $error) {
        out("{$error}");
        freepbx_log(FPBX_LOG_ERROR, _("cp error output: {$error}"));
    }
}
开发者ID:ntadmin,项目名称:framework,代码行数:10,代码来源:install.php


示例14: setDestination

function setDestination()
{
    $destNo = $_POST['Destination'];
    out($dest);
    $list = array('1' => array('name' => 'village', 'hazards' => 2), '2' => array('name' => 'town', 'hazards' => 4), '3' => array('name' => 'city', 'hazards' => 6));
    $dest = $list[$destNo];
    $_SESSION["destination"] = $dest;
    $_SESSION["hazards"] = $dest['hazards'];
    $_SESSION["step"]++;
}
开发者ID:foolishwang,项目名称:duck-adv,代码行数:10,代码来源:test04-travel.php


示例15: show_error

 function show_error()
 {
     if ($msg = mysql_error()) {
         out("<div style='background:#dadada'>");
         out($msg);
         out("</div>");
         return true;
     }
     return false;
 }
开发者ID:hoangsoft90,项目名称:hw-sudoku-wordpress,代码行数:10,代码来源:hphp.mysql.php


示例16: out

/**
 * Basic install script for XHGui2.
 *
 * Does the following things.
 *
 * - Downloads composer.
 * - Installs dependencies.
 */
function out($out)
{
    if (is_string($out)) {
        echo $out . "\n";
    }
    if (is_array($out)) {
        foreach ($out as $line) {
            out($line);
        }
    }
}
开发者ID:mikemiles86,项目名称:xhgui,代码行数:19,代码来源:install.php


示例17: install

function install($rootFolder)
{
    out('Installing');
    chdir("{$rootFolder}/");
    $phar = new Phar("{$rootFolder}/dashboard.phar");
    $phar->extractTo("{$rootFolder}/tmp/", null, true);
    system("mv {$rootFolder}/tmp/src/Hoborg/Dashboard/Resources/htdocs/index-phar.php {$rootFolder}/htdocs/index.php");
    system("mv {$rootFolder}/tmp/src/Hoborg/Dashboard/Resources/htdocs/static {$rootFolder}/htdocs/static");
    system("mv {$rootFolder}/tmp/src/Hoborg/Dashboard/Resources/htdocs/images {$rootFolder}/htdocs/images");
    system("rm -rf {$rootFolder}/tmp");
    return true;
}
开发者ID:hoborglabs,项目名称:dashboard,代码行数:12,代码来源:install.php


示例18: out

/**
 * 数据还原函数
 * @param unknown $data
 * @return string unknown
 */
function out($data) {
    if (is_string($data)) {
        return $data = stripslashes($data);
    } else if (is_array($data)) {
        foreach ($data as $key => $value) {
            $data[$key] = out($value);
        }
        return $data;
    } else {
        return $data;
    }
}
开发者ID:sayi21cn,项目名称:ecshopAndEctouch,代码行数:17,代码来源:Common.php


示例19: go_back

function go_back($param = false)
{
    if (!isset($_SERVER['HTTP_REFERER']) || $_SERVER['HTTP_REFERER'] == '') {
        out();
    }
    $url = $_SERVER['HTTP_REFERER'];
    if ($param != false) {
        $url .= mb_strpos($url, '?') === false ? '?' : '&';
        $url .= $param;
    }
    go($url);
}
开发者ID:ivanovv,项目名称:metro4all,代码行数:12,代码来源:lib.util.php


示例20: processString

function processString($c)
{
    $tokens = array();
    $start = microtime(true);
    $c = str_replace("\r", "", $c);
    foreach (token_get_all($c) as $i) {
        if (is_string($i)) {
            $name = $i;
            $chars = $i;
        } else {
            if (is_int($i[0])) {
                $name = token_name($i[0]);
                $chars = $i[1];
            } else {
                $name = $i[0];
                $chars = $i[1];
            }
        }
        if (!$name) {
            $name = $i[1];
        }
        $tokens[] = str_replace(array("\r", "\n"), array('\\r', '\\n'), $chars) . ' ' . $name;
    }
    $phpTime = microtime(true) - $start;
    var_dump($tokens);
    $out = array();
    $start = microtime(true);
    exec("php-parser --print-tokens --code " . escapeshellarg($c), $out, $ret);
    $parserTime = microtime(true) - $start;
    if ($ret != 0) {
        echo "php-parser failed\n";
        exit(255);
    }
    unset($out[0]);
    //remove "Parsing file ..."
    array_pop($out);
    //remove "successfully parsed"
    array_pop($out);
    //remove "end of file"
    $diff = array_diff($tokens, $out);
    if (!$diff || count($tokens) != count($out)) {
        echo "code correctly tokenized ({$parserTime} / {$phpTime})...\n";
    } else {
        echo "******* parser output:\n";
        out($out);
        echo "******* expected:\n";
        out($tokens);
        echo "******* differences in code:\n";
        out($diff);
        exit(255);
    }
}
开发者ID:KDE,项目名称:kdev-php,代码行数:52,代码来源:test-tokenize.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP outHash函数代码示例发布时间:2022-05-15
下一篇:
PHP ot_wpml_unregister_string函数代码示例发布时间: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