本文整理汇总了PHP中link::connect方法的典型用法代码示例。如果您正苦于以下问题:PHP link::connect方法的具体用法?PHP link::connect怎么用?PHP link::connect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类link
的用法示例。
在下文中一共展示了link::connect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkSession
public function checkSession($username)
{
$link = new link();
$con = $link->connect();
if (!isset($_SESSION['user'])) {
return "Session expired";
$session_state = 0;
} else {
$user_active_session = $_SESSION['user'];
$character_get = $_GET['character'];
$check_char_belong_session = mysqli_query($con, "SELECT * FROM v_user_characters\n WHERE username = '{$username}' AND character_eve_idcharacter = '{$character_get}'") or die(mysqli_error($con));
if (mysqli_num_rows($check_char_belong_session) == 0) {
$session_state = 0;
echo "Sneaky sneaky";
//exit();
} else {
$session_state = 1;
}
}
}
示例2: link
<?php
require_once 'tax.php';
require_once 'link.php';
$stationFromID = 60003760;
$stationToID = 60008494;
$link = new link();
$con = $link->connect();
$character_get = 95060857;
$transFrom = "buy";
$transTo = "sell";
$taxcalc = new tax($stationFromID, $stationToID, $con, $character_get, $transFrom, $transTo);
/* echo ($taxcalc->getCorpOwnerIDFromStation());
echo ($taxcalc->getCorpOwnerIDToStation());
echo ($taxcalc->getFactionOwnerIDFromStation($taxcalc->getCorpOwnerIDFromStation()));
echo ($taxcalc->getFactionOwnerIDToStation($taxcalc->getCorpOwnerIDToStation()));
echo $taxcalc->getFromCorpStanding($taxcalc->getCorpOwnerIDFromStation());
echo $taxcalc->getToCorpStanding($taxcalc->getCorpOwnerIDToStation());
echo ($taxcalc->getFromFactionStanding($taxcalc->getFactionOwnerIDFromStation($taxcalc->getCorpOwnerIDFromStation())));
echo ($taxcalc->getToFactionStanding($taxcalc->getFactionOwnerIDToStation($taxcalc->getCorpOwnerIDToStation())));
echo $taxcalc->getBrokerLevel();
echo $taxcalc->getAccountingLevel();*/
echo $taxcalc->calculateBrokerFrom();