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


PHP request::fetch方法代码示例

本文整理汇总了PHP中request::fetch方法的典型用法代码示例。如果您正苦于以下问题:PHP request::fetch方法的具体用法?PHP request::fetch怎么用?PHP request::fetch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在request的用法示例。


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

示例1: send

 public function send(socket $socket, request $request)
 {
     if ($this->has_cookie()) {
         $request->add_header('Cookie', $this->get_cookie_header());
     }
     $request_message = $request->fetch();
     // echo $request_message;
     $socket->write($request_message);
     $response = new response($socket->read());
     $cookies = $response->get_header('Set-Cookie');
     if ($cookies !== null) {
         if (is_array($cookies)) {
             foreach ($cookies as $cookie) {
                 $this->parse_cookie($cookie);
             }
         } else {
             $this->parse_cookie($cookies);
         }
     }
     return $response;
 }
开发者ID:wangping1987,项目名称:dhfriendluck,代码行数:21,代码来源:browser.php

示例2: while

 $mail->FromName = $row[1];
 $mail->From = $row[2];
 $mail->AddAddress($row[2], $row[1]);
 $mail->Subject = $strings['daily_alert_subject'];
 // Set default priority until otherwise notified
 $mail->Priority = "3";
 // Initialize body
 $body = '';
 // Initialize counts
 $taskCount = 0;
 $subtaskCount = 0;
 // See if there are any tasks pending
 $query = "SELECT {$tasksTable}.id,\n                     {$tasksTable}.name,\n                     {$tasksTable}.priority, \n                     {$tasksTable}.status, \n                     {$tasksTable}.completion,\n                     {$tasksTable}.start_date, \n                     {$tasksTable}.due_date,\n                     {$tasksTable}.description,\n                     {$projectsTable}.id, \n                     {$projectsTable}.name\n              FROM  {$tasksTable}, {$projectsTable}, {$membersTable}\n              WHERE {$tasksTable}.assigned_to = " . $assignedTo . "\n              AND {$tasksTable}.status != 1 \n              AND {$tasksTable}.due_date = '" . $today . "'\n              AND {$tasksTable}.project = {$projectsTable}.id\n              AND {$tasksTable}.assigned_to = {$membersTable}.id\n              ORDER BY {$tasksTable}.priority";
 $alertSub->query($query);
 // Create email body with link
 while ($alertSub->fetch()) {
     // Set task body
     if ($taskCount == 0) {
         $body .= $strings['alert_daily_task'] . "\n";
         $body .= "----------------------------------\n\n";
     }
     $body .= $strings['task'] . " : " . $row[1] . " (" . $row[0] . ") \n";
     //$body .= $strings['project']." : ".$row[10]." (".$row[9].") \n";
     $body .= $strings['project'] . " : " . $row[9] . "\n";
     //$body .= $strings['link']." : ".$root."/general/login.php?url=tasks/viewtask.php?id=".$row[0]."\n";
     $body .= $strings['link'] . " : " . $root . "/tasks/viewtask.php?id=" . $row[0] . "\n";
     $body .= $strings['start_date'] . " : " . $row[5] . "\n";
     $body .= $strings['due_date'] . " : " . $row[6] . "\n";
     if ($row[4] == 0) {
         $body .= $strings['completion'] . " : " . $row[4] . "%\n";
     } else {
开发者ID:ColBT,项目名称:php_tut,代码行数:31,代码来源:daily_alert.php

示例3: while

     //echo $tmpquery;
     $listHours->connectClass();
     $listHours->query($tmpquery);
     $totalHours = 0;
     $theor_weekly_hours = $work_package[PROJECT_WEEKLY_HOURS];
     //$project_begin=new DateTime($work_package[PROJECT_BEGIN]);
     $project_begin = $work_package[PROJECT_BEGIN];
     //echo $work_package[PROJECT_BEGIN];
     //$project_now=new DateTime();
     $project_now = "NOW";
     //$project_duration_interval=date_diff($project_begin,$project_now);
     //$project_duration=($project_duration_interval->format("%d"));
     $project_duration_interval = date_diff_outdated($project_begin, $project_now, "w");
     //echo $project_duration;
     //echo $project_duration_interval;
     while ($row = $listHours->fetch()) {
         $block2->openRow($db_date_index);
         $block2->cellRow("");
         $block2->cellRow("{$row[0]} > {$row[1]}");
         $block2->cellRow("{$row[2]}");
         $block2->closeRow();
         $totalHours += intval($row[2]);
     }
     $pract_weekly_hours = round($totalHours / $project_duration_interval, 2);
     $theor_total_hours = round($theor_weekly_hours * $project_duration_interval, 2);
     $block2->openRow($db_date_index);
     $block2->cellRow("");
     $block2->cellRow("Total");
     $block2->cellRow("{$totalHours} (theor: {$theor_total_hours}) > {$pract_weekly_hours} hours weekly (theor: {$theor_weekly_hours})");
     $block2->closeRow();
 }
开发者ID:TICanalyste,项目名称:netOffice--remix-,代码行数:31,代码来源:addon_hours_summary.php

示例4: request

/**
 * --- Task Timer ---
 *  
 */
//Check if a running timer exists
/**
 * TODO Check that idSession is numeric 
 */
$timerToggleScript = "";
$activeTask = 0;
$activeTaskStart = 0;
$existingtasktimer = new request();
$query = "SELECT task, start FROM no_tasks_timer WHERE owner = {$_SESSION['idSession']} LIMIT 1";
$existingtasktimer->connectClass();
$existingtasktimer->query($query);
if ($foundtasktimer = $existingtasktimer->fetch()) {
    //	echo $foundtasktimer[0];
    $activeTask = $foundtasktimer[0];
    $activeTaskStart = $foundtasktimer[1];
} else {
    //	echo "nothing found";
}
//echo $_SESSION['idSession'];
/**
 * TODO Add timer begin date and time at the end of task name 
 */
//Add timer begin date and time at the end of task name
// DEBUG
// foreach ($_POST as $k => $v) { print "<font color=blue>\$_POST[$k] => $v</font><br>"; }
// foreach ($_GET as $k => $v) { print "<font color=green>\$_GET[$k] => $v</font><br>"; }
// foreach ($_SESSION as $k => $v) { print "<font color=red>\$_SESSION[$k] => $v</font><br>"; }
开发者ID:TICanalyste,项目名称:netOffice--remix-,代码行数:31,代码来源:home.php


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