dev-master
9999999-devPhp Aliyun Odps Sdk
BSD-3-Clause
The Requires
aliyun odps max compute
Wallogit.com
2017 © Pedro Peláez
Php Aliyun Odps Sdk
, (*1)
Since some data types(such as Bigint, Datetime) in ODPS depends on 64bit integer (long in java), and php32 build doesn't include this type, so we have to use php 64bit version for running odps project., (*3)
----由于odps中的数据类型Bigint、Datetime的传输依赖于64位的长整型,而php默认只有64位版本才支持64位的整型,因此当前odps php sdk必须运行于64位的php版本。, (*4)
You must use the ODPS php SDK upon any php 64bit versoin of Linux/mac-os or the php 7+ 64bit on windows since a bug, (*5)
----由于php的一个问题,如果我们使用windows的情况下,请务必使用php7+ 64位版本, Linux/MacOs则直接使用64位版本即可。, (*6)
Odps-php-sdk includes the following services to access RestFul api:, (*7)
<?php
require_once __DIR__ . "/autoload.php";
use \ODPS\Core\OdpsClient;
use \ODPS\Services\TableService;
$odps = new OdpsClient("TR2QyWfDusb0Tgce", "ZPJZBMEr2pcMP2fsGeHH36PzZeNYHW",
"http://service.odps.aliyun.com/api", "xioxu_project");
$tableService = new TableService($odps);
$tables = $tableService->getTables();
foreach ($tables as $table) {
print $table->Name . "\r\n";
}
Please refer to unit test case to get more detail usage of each service., (*8)
$service = new ResourceService($odps); $service->setCurrProject($currProject);, (*9)
$odps = new Odps(...) $odps->setDebugMode(true); ... do service request... $tableService = new TableService($odps); $result = $tableService.getTable($tblName); print $result->debugInfo;
To enable an http proxy for catching the http traffic or any other reasons, please use the folloing line in config.php:, (*10)
define("SetOpensearchServiceCallHttpProxy", "localhost:8888");
Php Aliyun Odps Sdk
BSD-3-Clause
aliyun odps max compute