PHP使用出现 Fatal error: Class 'SQLite3' not found
2016-05-06 14:10
811 查看
<?php //phpinfo(); /** * Simple example of extending the SQLite3 class and changing the __construct * parameters, then using the open method to initialize the DB. */ class MyDB extends SQLite3 { function __construct() { $this->open('test.db'); } } $db = new MyDB(); $db->exec('CREATE TABLE foo (bar STRING)'); $db->exec("INSERT INTO foo (bar) VALUES ('This is a test')"); $result = $db->query('SELECT bar FROM foo'); var_dump($result->fetchArray()); ?>
运行的时候出现异常:
Class 'SQLite3' not found in。。。。。。
需要在php.ini中修改下面的配置
extension_dir = "C:/php/php7.0/ext" extension=php_pdo_sqlite.dll extension=php_sqlite3.dll sqlite3.extension_dir = "C:/php/php7.0/ext"
相关文章推荐
- PHP自学no00011数据类型转换
- PHP自学no00010特殊数据类型之空值
- PHP自学no00009数据类型浮点型之圆周率输出
- Zendstudio 设置默认方法注释
- zend studio导入thinkphp的乱码问题
- PHP自学no00008数据类型整数型多进制输出
- Yii 将对象转化成数组
- yii2操作数据库 mysql 读写分离 主从复制
- Yii2 数据操作Query Builder
- Yii2.0 rules验证规则大全
- php 之 数据访问 查询关键字 (0506)
- wamp+zendstudio12+xDebugger环境搭建
- 500 Illegal PORT command的问题(FTP主被动模式)
- PHP实现的简单分页类及用法示例
- 【PHP PDO】纯PHP(不使用框架)下 Mysql PDO 使用方法小记
- 【PHP PDO】纯PHP(不使用框架)下 Mysql PDO 使用方法小记
- php第十三节课
- PHP实现的多文件上传类及用法示例
- PHP动态地创建属性和方法, 对象的复制, 对象的比较,加载指定的文件,自动加载类文件,命名空间
- 使用JMeter创建FTP测试计划