有没有连接Firebase和php Codeigniter 3的解决方案或方法?

有没有连接Firebase和php Codeigniter 3的解决方案或方法?,php,firebase,firebase-realtime-database,firebase-authentication,codeigniter-3,Php,Firebase,Firebase Realtime Database,Firebase Authentication,Codeigniter 3,有什么方法或解决方案可以连接Firebase和php Codeigniter-3吗?或者有可能互相联系吗 您可以在项目中使用FireBase,方法是 使用Firebase\Firebase 谢谢分享。您能否解释有关CodeIgniter内部工作的更多详细信息,如文件需要配置或编辑的位置?感谢在两个文件夹中通常有一个.htaccess文件,这会阻止直接访问PHP文件。但是,如果.htaccess因任何原因停止工作,将这些文件夹移到web根目录之外可以提高安全性。例如,如果index.php文件位

有什么方法或解决方案可以连接Firebase和php Codeigniter-3吗?或者有可能互相联系吗

您可以在项目中使用FireBase,方法是

使用Firebase\Firebase


谢谢分享。您能否解释有关CodeIgniter内部工作的更多详细信息,如文件需要配置或编辑的位置?感谢在两个文件夹中通常有一个.htaccess文件,这会阻止直接访问PHP文件。但是,如果.htaccess因任何原因停止工作,将这些文件夹移到web根目录之外可以提高安全性。例如,如果index.php文件位于/home/public_html/project/,则应用程序和系统文件夹应位于/home/path:
$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'));