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


PHP out函数代码示例

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


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


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