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


PHP line函数代码示例

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


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

示例1: register

 function register()
 {
     $this->load->library('validation');
     $rules = array('first_name' => 'required|alpha_dash', 'last_name' => ($this->settings->item('require_lastname') ? 'required' : '') . 'alpha_dash', 'password' => 'required|min_length[6]|max_length[20]', 'confirm_password' => 'required|matches[password]', 'email' => 'required|valid_email', 'confirm_email' => 'required|valid_email|matches[email]');
     $this->validation->set_rules($rules);
     $this->validation->set_fields();
     $email = $this->input->post('email');
     $password = $this->input->post('password');
     if ($this->validation->run()) {
         // Try and create the user
         if ($id = $this->user_lib->create($email, $password)) {
             // Now they have been created, does the admin want activation emails to be sent out?
             if ($this->settings->item('activation_email') == 1) {
                 // They do? Ok, send out an email to the user
                 if ($this->user_lib->registered_email($this->user_lib->user_data)) {
                     $this->session->set_flashdata(array('notice' => $this->lang->line('user_activation_code_sent_notice')));
                     redirect('users/activate/' . $id);
                 }
                 // or should we let the admin manually activate them?
             } else {
                 $this->session->set_flashdata(array('notice' => $this->lang - line('user_activation_by_admin_notice')));
                 redirect('');
             }
             // Can't create the user, show why
         } else {
             $this->data->error_string = $this->lang->line($this->user_lib->error_code);
         }
     } else {
         // Return the validation error message or user_lib error
         $this->data->error_string = $this->validation->error_string;
     }
     $this->layout->title($this->lang->line('user_register_title'));
     $this->layout->create('register', $this->data);
 }
开发者ID:nhockiki,项目名称:pyrocms,代码行数:34,代码来源:users.php

示例2: debug_lexer

function debug_lexer($lexer)
{
    $fmt = str_repeat('%-30s', 4);
    line(sprintf($fmt, "In type", "In value", "Out type", "Out value"));
    line(sprintf($fmt, "-------", "--------", "--------", "---------"));
    foreach ($lexer->debug as $row) {
        line(sprintf($fmt, $row['in_type'], str_replace("\n", '\\n', "'" . $row['in_value'] . "'"), $row['out_type'], "'" . $row['out_value'] . "'"));
    }
}
开发者ID:rgp,项目名称:snowscript,代码行数:9,代码来源:bootstrap_tests.php

示例3: send_response

function send_response($d1, $d2)
{
    echo line("{");
    // Start
    echo line(' 	"date1": "' . $d1 . '",');
    echo line(' 	"date2": "' . $d2 . '"');
    echo line("}");
    // end
}
开发者ID:simonscerri,项目名称:tapsensordemo,代码行数:9,代码来源:request_date.php

示例4: send_response

function send_response($temp1, $temp2, $temp3, $temp4)
{
    echo line("{");
    // Start
    echo line(' 	"temp1": "' . $temp1 . '",');
    echo line(' 	"temp2": "' . $temp2 . '",');
    echo line(' 	"temp3": "' . $temp3 . '",');
    echo line(' 	"temp4": "' . $temp4 . '"');
    echo line("}");
    // end
}
开发者ID:simonscerri,项目名称:tapsensordemo,代码行数:11,代码来源:request_data.php

示例5: generate_xml

function generate_xml($post, $path)
{
    $structure_txt = file_get_contents($path, true);
    if ($structure_txt == False) {
        echo "{$path} is not readable. Try changing the permission of the destination folder and {$path} to 777 if it exists.";
        exit;
    }
    $lines = explode("\n", $structure_txt);
    $i = 0;
    $return_value = "";
    foreach ($lines as $line) {
        if ($line != "" and $line != " " and $line[0] != '#') {
            if (preg_match_all('#\\<[^,]+\\>#', $line, $arr, PREG_PATTERN_ORDER)) {
                $return_value .= line(trim($arr[0][0]));
            } else {
                if (preg_match_all('#([^(), <>]+)\\(([^()]+)\\)#', $line, $arr, PREG_SET_ORDER)) {
                    $tag = sanitize(trim($arr[0][1]));
                    $items = explode_and_trim(',', $arr[0][2]);
                    $i++;
                    $content = line("<{$tag}>");
                    $show = false;
                    foreach ($items as $var) {
                        $var = sanitize($var);
                        $var_name = $tag . "_" . $var;
                        $var_name = preg_replace('/\\./', '_', $var_name);
                        if (isset($post[$var_name]) and $post[$var_name] != "") {
                            $inside = sanitize($post[$var_name]);
                            $content .= line("<{$var}>{$inside}</{$var}>");
                            $show = true;
                        }
                    }
                    $content .= line("</{$tag}>");
                    if ($show == true) {
                        $return_value .= $content;
                    }
                }
            }
        }
    }
    return $return_value;
}
开发者ID:jsimkins2,项目名称:pecan,代码行数:41,代码来源:functions.php

示例6: menu

 public function menu()
 {
     $id = $this->uri->segment(3);
     $id = $id !== false ? $id : message($this->lang > line('error'), 'system/menuGroup');
     $this->load->helper(array('form'));
     $data = $this->common->setConfig($this->common->configs, array('global.css'), array($this->common->js, 'validateMyForm/jquery.validateMyForm.1.0.js', 'global.js'));
     $data['form'] = form_open('system/menuSave', array('id' => 'form1'));
     $this->db->where('menu_id', $id);
     $db = clone $this->db;
     $query = $this->db->get('menu_rights');
     $total = $query->num_rows();
     $url = base_url(index_page() . '/system/menu/' . $id . '/');
     $this->load->library('pagination');
     $config = $this->common->pageConfig($url, $total, 14, 4);
     $this->pagination->initialize($config);
     $this->db = $db;
     $this->db->from('menu_rights');
     $this->db->order_by('paixun', 'asc');
     $this->db->limit($config['per_page'], $this->uri->segment($config['uri_segment'], 0));
     $menu = $this->db->get();
     $data['menu'] = $menu->result_array();
     $data['id'] = $id;
     $this->load->view('head', $data);
     $this->load->view('system_menu');
     $this->load->view('foot');
 }
开发者ID:chentaoz,项目名称:TourismWeb,代码行数:26,代码来源:system.php

示例7: line

$dir->close();
line("CLEANED TMP DIR");
debug("cleaning", "cacheDir");
$clearTime = time() - 60 * 60;
$dir = dir($config['cacheDir']);
while ($entry = $dir->read()) {
    if ($entry == "." || $entry == "..") {
        continue;
    }
    $file = $config['cacheDir'] . "/{$entry}";
    if (is_dir($file)) {
        continue;
    }
    if (filemtime($file) < $clearTime) {
        if (!unlink($file)) {
            logError("could not delete: {$file}");
        }
    }
}
$dir->close();
line("CLEANED CACHE DIR");
// TODO update subject tree language availability
// TODO remove old sotf_delete objects
// ******** Stop old streams
$playlist = new sotf_Playlist();
$playlist->stopOldStreams();
line("CRON FINISHED");
stopTiming();
$page->logRequest();
debug("--------------- CRON FINISHED -----------------------------------");
//echo "<h4>Cron.php completed</h4>";
开发者ID:BackupTheBerlios,项目名称:sotf-svn,代码行数:31,代码来源:cron.php

示例8: line

   line("Ports will regenerate every",$schedule_info[ticks_full] ." minutes&nbsp;");
   $res=$db->Execute("SELECT ticks_full FROM $dbtables[scheduler] WHERE file = 'sched_tow.php' LIMIT 1");
   $schedule_info = $res->fields;
   line("Ships will be towed from fed sectors every",$schedule_info[ticks_full] ." minutes&nbsp;");
   $res=$db->Execute("SELECT ticks_full FROM $dbtables[scheduler] WHERE file = 'sched_ranking.php' LIMIT 1");
   $schedule_info = $res->fields;
   line("Rankings will be generated every",$schedule_info[ticks_full] ." minutes&nbsp;");
   $res=$db->Execute("SELECT ticks_full FROM $dbtables[scheduler] WHERE file = 'sched_degrade.php' LIMIT 1");
   $schedule_info = $res->fields;
   line("Sector Defences will degrade every",$schedule_info[ticks_full] ." minutes&nbsp;");
   $res=$db->Execute("SELECT ticks_full FROM $dbtables[scheduler] WHERE file = 'sched_apocalypse.php' LIMIT 1");
   $schedule_info = $res->fields;
   line("The planetary apocalypse will occur every&nbsp;",$schedule_info[ticks_full] ." minutes&nbsp;");
   $res=$db->Execute("SELECT ticks_full FROM $dbtables[scheduler] WHERE file = 'sched_mooring.php' LIMIT 1");
   $schedule_info = $res->fields;
   line("Mooring fees will be charged every&nbsp;",$schedule_info[ticks_full] ." minutes&nbsp;");
  echo "</TABLE>";


echo "<BR><BR>";

if(empty($username))
{
  TEXT_GOTOLOGIN();
}
else
{
  TEXT_GOTOMAIN();
}

include("footer.php");
开发者ID:antt1995,项目名称:starkicktraders,代码行数:31,代码来源:settings.php

示例9: line

<?
require_once 'library/query/query.php';
function line($lineFeededString)
{
	$el = "</line>"; $sl = "<line>";
	return $sl.implode("$el$sl", explode("\n", $lineFeededString)).$el;
}
$name = Query::getName();
$headline = Query::getGenre();
$presentation = line(Query::getInterests());
$membres = "";
$array = array_reverse(Query::getMembres());
foreach($array as $membre)
	$membres .= "<membre name=\"{$membre[0]}\" image=\"{$membre[1]}\"/>";
?>
开发者ID:pier22,项目名称:Band-Page-FB,代码行数:15,代码来源:trio.php

示例10: line

        $ftp = "OK";
    }
    line($TEXT['status-ftp'], $ftp);
}
if (file_exists("{$partwampp}\\tomcat\\conf\\server.xml")) {
    if (false === @fsockopen($ip, 8080)) {
        $tomcat = "NOK";
    } else {
        $tomcat = "OK";
    }
    line($TEXT['status-tomcat'], $tomcat);
}
if (file_exists("{$partwampp}\\apache\\bin\\python.exe")) {
    $a = @file("http://{$hostauth}{$host}/xampp/python.py");
    $python = $a[0];
    line($TEXT['status-python'], $python);
}
echo "<tr valign='bottom'>";
echo "<td bgcolor='#fb7922'></td>";
echo "<td bgcolor='#fb7922' colspan='3'><img src='img/blank.gif' alt='' width='1' height='8'></td>";
echo "<td bgcolor='#fb7922'></td>";
echo "</tr>";
echo "</table>";
?>

        <p><?php 
echo $TEXT['status-text2'];
?>
</p>

    </body>
开发者ID:ASeptiadi,项目名称:TugasBesar,代码行数:31,代码来源:status.php

示例11: line

        echo "<tr bgcolor='#ffffff'><td></td><td colspan='1' class='small'>{$info}<br><img src='img/blank.gif' alt='' width='10' height='10' border='0'></td><td></td><td></td></tr>";
    }
    $i++;
}
echo "<table border='0' cellpadding='0' cellspacing='0'>";
echo "<tr valign='top'>";
echo "<td bgcolor='#fb7922' valign='top'><img src='img/blank.gif' alt='' width='10' height='0'></td>";
echo "<td bgcolor='#fb7922' class='tabhead'><img src='img/blank.gif' alt='' width='250' height='6'><br>" . $TEXT['security-tab1'] . "</td>";
echo "<td bgcolor='#fb7922' class='tabhead'><img src='img/blank.gif' alt='' width='100' height='6'><br>" . $TEXT['security-tab2'] . "</td>";
echo "<td bgcolor='#fb7922' valign='top'><br><img src='img/blank.gif' alt='' width='1' height='10'></td>";
echo "</tr>";
line($TEXT['security-checkapache-nok'], $TEXT['security-checkapache-ok'], $TEXT['security-checkapache-text'], "", "", "xampp");
line($TEXT['security-checkmysql-nok'], $TEXT['security-checkmysql-ok'], $TEXT['security-checkmysql-text'], $TEXT['security-checkmysql-out'], "", "mysqlroot");
line($TEXT['security-phpmyadmin-nok'], $TEXT['security-phpmyadmin-ok'], $TEXT['security-phpmyadmin-text'], $TEXT['security-phpmyadmin-out'], "", "phpmyadmin");
// line($TEXT['security-checkphp-nok'], $TEXT['security-checkphp-ok'], $TEXT['security-checkphp-text'], $TEXT['security-checkphp-out'], "", "php");
line($TEXT['security-checktomcat-nok'], $TEXT['security-checktomcat-ok'], $TEXT['security-checktomcat-text'], $TEXT['security-checktomcat-out'], $TEXT['security-checktomcat-notinstalled'], "tomcat");
echo "<tr valign='bottom'>";
echo "<td bgcolor='#fb7922'></td>";
echo "<td bgcolor='#fb7922' colspan='3'><img src='img/blank.gif' alt='' width='1' height='8'></td>";
echo "<td bgcolor='#fb7922'></td>";
echo "</tr>";
echo "</table>";
echo "<p>";
?>
        <?php 
echo $TEXT['security-text2'];
?>
<p>
        <?php 
echo $TEXT['security-text3'];
?>
开发者ID:join1603,项目名称:wme2a,代码行数:31,代码来源:security.php

示例12: line

}
if (file_exists("{$partwampp}\\FileZillaFTP\\FileZilla Server.xml")) {
    if (false === @fsockopen($ip, 21)) {
        $ftp = "NOK";
    } else {
        $ftp = "OK";
    }
    line($TEXT['status-ftp'], $ftp);
}
if (file_exists("{$partwampp}\\tomcat\\conf\\server.xml")) {
    if (false === @fsockopen($ip, 8080)) {
        $tomcat = "NOK";
    } else {
        $tomcat = "OK";
    }
    line($TEXT['status-tomcat'], $tomcat);
}
echo "<tr valign='bottom'>";
echo "<td bgcolor='#fb7922'></td>";
echo "<td bgcolor='#fb7922' colspan='3'><img src='img/blank.gif' alt='' width='1' height='8'></td>";
echo "<td bgcolor='#fb7922'></td>";
echo "</tr>";
echo "</table>";
?>

        <p><?php 
echo $TEXT['status-text2'];
?>
</p>

    </body>
开发者ID:TheSkyNet,项目名称:railoapacheportable,代码行数:31,代码来源:status.php

示例13: line

    if (($handle = @fsockopen($host, 8080, $errno, $errstr, $timeout)) == false) {
        $tomcat = "NOK";
    } else {
        $tomcat = "OK";
    }
    @fclose($handle);
    line($TEXT['status-tomcat'], $tomcat);
}
if (file_exists("{$partwampp}\\PosadisDNS\\posadis.exe")) {
    if (($handle = @fsockopen($host, 53, $errno, $errstr, $timeout)) == false) {
        $named = "NOK";
    } else {
        $named = "OK";
    }
    @fclose($handle);
    line($TEXT['status-named'], $named);
}
echo "<tr valign='bottom'>";
echo "<td bgcolor='#fb7922'></td>";
echo "<td bgcolor='#fb7922' colspan='3'><img src='img/blank.gif' alt='' width='1' height='8'></td>";
echo "<td bgcolor='#fb7922'></td>";
echo "</tr>";
echo "</table>";
echo "<p>";
?>

		<?php 
echo $TEXT['status-text2'];
?>
<p>
开发者ID:promoso,项目名称:HVAC,代码行数:30,代码来源:status.php

示例14: edit

 /**
  * "Edit" Page
  *
  * Shows a form representing the currently selected DB
  * so that data can be edited
  *
  * @access	public
  * @return	string	the HTML "edit" page
  */
 function edit($id = '')
 {
     if ($id === '') {
         redirect($this->url['view']);
     }
     $this->CI->load->library('form_validation');
     $rules = array();
     foreach ($this->fields as $field) {
         if ($field->primary_key == 1) {
             continue;
         }
         if (!$field->isdisplay) {
             continue;
         }
         $res = array();
         //password confirm
         if ($field->elementType == 'password') {
             $res['field'] = $field->name;
             $res['label'] = line('password_confirm');
             $res['rules'] = 'matches[' . $field->name . ']|' . $field->validation;
         }
         $res['field'] = $field->name;
         $res['label'] = $field->lang;
         $res['rules'] = $field->validation;
         $rules[] = $res;
     }
     $this->CI->form_validation->set_rules($rules);
     if ($this->CI->form_validation->run() == FALSE) {
         $select_str = '';
         foreach ($this->fields as $field) {
             if ($field->isdisplay || $field->primary_key) {
                 $select_str .= $field->name . ',';
             }
         }
         if (!empty($select_str)) {
             $this->CI->db->select(substr($select_str, 0, -1));
         }
         // Run the query
         $query = $this->CI->db->get_where($this->current_table, array($this->key => $id));
         $data = array('title' => $this->title, 'fields' => $this->fields, 'query' => $query->row(), 'url' => $this->url, 'id' => $id);
         lav('lib/dbshortcut/edit', $data);
     } else {
         $this->post_filter();
         $this->CI->db->update($this->current_table, $_POST, array($this->key => $id));
         redirect($this->url['view']);
     }
 }
开发者ID:hetykai,项目名称:domain_auction,代码行数:56,代码来源:Dbshortcut.php

示例15: line

    $opcache = "NOK";
}
echo '<table border=0 cellpadding=0 cellspacing=0>';
echo "<tr valign=top>";
echo "<td bgcolor=#fb7922 valign=top><img src=img/blank.gif width=10 height=0></td>";
echo "<td bgcolor=#fb7922 class=tabhead><img src=img/blank.gif width=250 height=6><br>" . $TEXT['status-tab1'] . "</td>";
echo "<td bgcolor=#fb7922 class=tabhead><img src=img/blank.gif width=100 height=6><br>" . $TEXT['status-tab2'] . "</td>";
echo "<td bgcolor=#fb7922 class=tabhead><img src=img/blank.gif width=100 height=6><br>" . $TEXT['status-tab3'] . "</td>";
echo "<td bgcolor=#fb7922 valign=top><br><img src=img/blank.gif width=1 height=10></td>";
echo "</tr>";
line($TEXT['status-mysql'], $mysql);
line($TEXT['status-php'], $php);
line($TEXT['status-perl'], $perl);
line($TEXT['status-cgi'], $cgi);
line($TEXT['status-ssi'], $ssi);
line($TEXT['status-opcache'], $opcache, $TEXT['status-opcache-url']);
#line($TEXT['status-mmcache'],$eaccelerator,$TEXT['status-mmcache-url']);
line($TEXT['status-oci8'], $oci8, $TEXT['status-oci8-url']);
echo "<tr valign=bottom>";
echo "<td bgcolor=#fb7922></td>";
echo "<td bgcolor=#fb7922 colspan=3><img src=img/blank.gif width=1 height=8></td>";
echo "<td bgcolor=#fb7922></td>";
echo "</tr>";
echo "</table>";
echo "<p>";
echo $TEXT['status-text2'];
?>
<p>
</body>
</html>
开发者ID:omyyalliu,项目名称:web,代码行数:30,代码来源:status.php


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