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


PHP Api::connect方法代码示例

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


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

示例1: opration

 /**
  * 七牛操作
  * @method opration
  * @param  string   $op [操作命令]
  * @return bool     	[操作结果]
  * @author NewFuture
  */
 private static function opration($op)
 {
     $token = self::sign($op . PHP_EOL);
     $url = self::QINIU_RS . $op;
     $header = array('Authorization: QBox ' . $token);
     if (($response = Api::connect($url, $header, 'POST')) && $response['header'][0] == 'HTTP/1.1 200 OK') {
         return true;
     } else {
         /*操作出错*/
         if (\Config::get('isdebug')) {
             \PC::debug($response, '七牛请求出错');
         }
         \Log::write('七牛错误' . $url . ':' . json_encode($response, JSON_UNESCAPED_UNICODE), 'ERROR');
         return false;
     }
 }
开发者ID:wuxw,项目名称:YYF,代码行数:23,代码来源:Qiniu.php

示例2: error_reporting

<?php

/* * *******************************************************************************
 * The content of this file is subject to the MYC Vtiger Customer Portal license.
 * ("License"); You may not use this file except in compliance with the License
 * The Initial Developer of the Original Code is Proseguo s.l. - MakeYourCloud
 * Portions created by Proseguo s.l. - MakeYourCloud are Copyright(C) Proseguo s.l. - MakeYourCloud
 * All Rights Reserved.
 * ****************************************************************************** */
$app_stus = "PRODUCTION";
//SET TO PRODUCTION TO DISABLE ERRORS
if ($app_stus == "PRODUCTION") {
    error_reporting(0);
}
//Require all files necessary for the application to start, including user settings, soap library for enstablish the connection, and the portal classes
require_once "portal.php";
//Load the portal configuration if presents or run the wizard
PortalConfig::load();
//Establish the connection with the crm customer portal webservices
Portal::connect();
//Check if there are stored variables then if the user is previously logged or if has sent some login/forgot request, else provide him a logging screen
User::check_login();
//Start the vtlib api connection if parameters are given in the config file
Api::connect();
//Load the plugins from the plugins directory
Plugins::load_plugins();
//If the login is passed analyze the REQUEST and call the requested action.
Router::start();
开发者ID:tsolucio,项目名称:coreBOSMYCCP,代码行数:28,代码来源:index.php

示例3: is_connected

 public static function is_connected()
 {
     global $api_client;
     if (!isset($api_client) || $api_client == "NOT_CONFIGURED" || $api_client == "API_LOGIN_FAILED") {
         Api::connect();
         if (!isset($api_client) || $api_client == "NOT_CONFIGURED" || $api_client == "API_LOGIN_FAILED") {
             return false;
         } else {
             return true;
         }
     } else {
         return true;
     }
 }
开发者ID:barra,项目名称:myc-vtiger-customer-portal,代码行数:14,代码来源:portal.php


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