2016-08-25 8 views
0

firebaseデータベースとphpのcodeigniterプロジェクトを接続したいと思います。phpのcodeigniterとのFirebase接続

私は厳密解とライブラリを見つけることができません。..

私は接続するために従うべき正しい手順で正しいライブラリをお勧めしてください。

ありがとうございます。

+0

を使用して、プロジェクト内のFireBaseを使用することができます....私がしようとしていますので、StackOverflowのは、こんにちは......そのため – karan

答えて

0

あなたは、私がライブラリを結合することができないのですhttps://github.com/eelkevdbos/firebase-php

use Firebase\Firebase; 

$fb = Firebase::initialize(YOUR_FIREBASE_URL, YOUR_FIREBASE_SECRET); 

//or set your own implementation of the ClientInterface as second parameter of the regular constructor 
$fb = new Firebase([ 'base_url' => YOUR_FIREBASE_BASE_URL, 'token' => YOUR_FIREBASE_SECRET ], new GuzzleHttp\Client()); 

//retrieve a node 
$nodeGetContent = $fb->get('/node/path'); 

//set the content of a node 
$nodeSetContent = $fb->set('/node/path', array('data' => 'toset')); 

//update the content of a node 
$nodeUpdateContent = $fb->update('/node/path', array('data' => 'toupdate')); 

//delete a node 
$nodeDeleteContent = $fb->delete('/node/path'); 

//push a new item to a node 
$nodePushContent = $fb->push('/node/path', array('name' => 'item on list')); 
+0

ではありませんそれをcodeigniterに統合すると、私はcodeigniterとfirebaseの両方に新しいです。あなたがしなければならない内部作業を説明してください。どのようにこのパッケージのファイルを配置するように、どのように設定する。お願いします –