sar*_*nkg 3 php sdk parse-platform
我使用以下代码获取db数据:
require 'autoload.php';
$app_id='AAAAA';
$rest_key='XXXXX';
$master_key='RRRRR';
use Parse\ParseObject;
use Parse\ParseQuery;
use Parse\ParseACL;
use Parse\ParsePush;
use Parse\ParseUser;
use Parse\ParseInstallation;
use Parse\ParseException;
use Parse\ParseClient;
use Parse\ParseAnalytics;
use Parse\ParseFile;
use Parse\ParseCloud;
ParseClient::initialize( $app_id, $rest_key, $master_key );
$object = new ParseQuery("Schools");
$playername = $object->get("playername");
Run Code Online (Sandbox Code Playgroud)
我在我的解析帐户数据库中有一些"学校"类,包含一些数据.我试图获取"playername"值,但我收到以下错误:
Fatal error: Uncaught exception 'Parse\ParseException' with message 'SSL certificate problem: unable to get local issuer certificate' in C:\xampp\htdocs\planlet\src\Parse\ParseClient.php:250 Stack trace: #0 C:\xampp\htdocs\planlet\src\Parse\ParseQuery.php(305): Parse\ParseClient::_request('GET', '/1/classes/Scho...', NULL, NULL, false) #1 C:\xampp\htdocs\planlet\src\Parse\ParseQuery.php(248): Parse\ParseQuery->find(false) #2 C:\xampp\htdocs\planlet\src\Parse\ParseQuery.php(70): Parse\ParseQuery->first(false) #3 C:\xampp\htdocs\planlet\first.php(23): Parse\ParseQuery->get('schoolName') #4 {main} thrown in C:\xampp\htdocs\planlet\src\Parse\ParseClient.php on line 250
Run Code Online (Sandbox Code Playgroud)
现在我正在使用我的localhost xampp服务器XAMPP 1.8.2 [PHP:5.4.31]
如何解决这个问题呢?
Atif Ghaffar在https://groups.google.com/forum/#!topic/parse-developers/f5RPj6DHA2E小组中提供了一个补丁,用于在XAMPP环境中使用Parse SDK.
您可以通过将此ParseClient.php文件替换为此https://gist.githubusercontent.com/allinora/df4dde146bdc4d635306/raw/67a4c2a560e3f69c3d4e4f51b00e5711dc94b520/ParseClient.php来解决此问题.