當前位置: 首頁>>代碼示例>>PHP>>正文


PHP link::connect方法代碼示例

本文整理匯總了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;
         }
     }
 }
開發者ID:marcfeather,項目名稱:EveTradeMaster,代碼行數:20,代碼來源:session.php

示例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();
開發者ID:marcfeather,項目名稱:EveTradeMaster,代碼行數:31,代碼來源:test.php


注:本文中的link::connect方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。