Last active
October 6, 2016 02:47
-
-
Save openopen114/e29f7ac9981bcae96e73f1cadd0491d5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'vendor/autoload.php'; | |
const DEFAULT_URL = 'https://phpdemoccc-sd27f.firebaseio.com/'; | |
const DEFAULT_PATH = '/'; | |
$firebase = new \Firebase\FirebaseLib(DEFAULT_URL); | |
// --- get data --- | |
$k1 = $firebase->get('/k1'); | |
$k2 = $firebase->get('/20110909/tot'); | |
echo "=============="."</br>"; | |
echo $k1."</br>"; | |
echo $k2."</br>"; | |
echo "=============="."</br>"; | |
// --- save data --- | |
$firebase->set('/k1', 5566); | |
$k1 = $firebase->get('/k1'); | |
$k2 = $firebase->get('/20110909/tot'); | |
echo "=============="."</br>"; | |
echo $k1."</br>"; | |
echo $k2."</br>"; | |
echo "=============="."</br>"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment