本文整理汇总了PHP中SessionHandler::connect方法的典型用法代码示例。如果您正苦于以下问题:PHP SessionHandler::connect方法的具体用法?PHP SessionHandler::connect怎么用?PHP SessionHandler::connect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SessionHandler
的用法示例。
在下文中一共展示了SessionHandler::connect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: date
<?php
require_once "includes.php";
/**
* Code to update ushahidi instance from crowdflower.
*
*/
SessionHandler::connect();
$date = date("Y-m-d H:i:s");
$short = "signal: " . $_POST['signal'] . " \npayload: " . $_POST['payload'];
if ($_POST['signal'] != "unit_complete") {
$sql = "INSERT INTO debug (content, date) values ('(NON-COMPLETE): " . mysql_real_escape_string($short) . "', '{$date}');";
mysql_query($sql);
die;
#We only want unit completion notifications
} else {
$sql = "INSERT INTO debug (content, date) values ('" . mysql_real_escape_string($short) . "', '{$date}');";
mysql_query($sql);
}
$requesta = json_decode(urldecode($_POST['payload']), true);
$id = $requesta['data']['ushahidi_id'];
$randIdent = $requesta['data']['randIdent'];
$message = $requesta['data']['sms_text'];
if ($id == '') {
$sql = "INSERT INTO debug (content, date) values ('BAD ID: " . mysql_real_escape_string($short) . "', '{$date}');";
mysql_query($sql);
print "no id\n";
die;
}
$sql = "SELECT location_name FROM location JOIN incident ON incident.location_id = location.id WHERE incident.id = {$id};";
$current_loc_name = DBQuery::return_value_from_sql($sql);
示例2: connect
public static function connect()
{
SessionHandler::connect();
}