Closed ztd closed 8 years ago
flight+medoo新用Flight::register方法,medoo出现找不到quote方法,不能正常使用,怎么回事?
不知道,你咋用的,我反正用的好好的
require 'flight/Flight.php'; require 'medoo.php';
Flight::register('db', 'medoo', array('database_type'=>'sqlite', 'database_file'=>'data.db')); Flight::route('/', function(){ $db = Flight::db(); $result = $db->select('table', '*', array('id'=>1)); var_dump($result); });
Flight::start();
Fatal error: Call to a member function query() on a non-object in /Users/ztd/PhpstormProjects/flight/medoo.php on line 167
@ztd 你这哪里能直接这样用,请参考flight-app-demo 推荐使用Flight::map
@ycrao 谢谢,我已找到解决方法,要在数组参数上再嵌套一个数组: Flight::register('db', 'medoo', array(array('database_type'=>'sqlite', 'database_file'=>'data.db')));
I'm having the same issue still now, is there any solution?
flight+medoo use register methods error!help