使用php连接到sqlite数据库的问题 [英] Problem connecting to a sqlite database using php

查看:43
本文介绍了使用php连接到sqlite数据库的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用 php 连接到 sqlite 数据库.我已经在我的本地系统上安装了 sqlite 并在 linux 机器(我们的本地服务器)上配置了一个 web 服务器.当我在 linux 机器上执行 php 文件时,它不起作用,它只是显示一个空白页面.

I need to connect to a sqlite database using php. I have installed sqlite on my local system and configured a web server on a linux machine (our local server.) When I execute the php file on the linux machine, it does not work, it just shows a blank page.

我需要在同一台机器上安装 sqlite 和 php 吗?

Do I need to install both sqlite and php on the same machine?

推荐答案

SQLite 并不是真正的 DBMS,而更像是一个带有一些 API 的平面文件,以 SQL 数据库的方式对其进行操作.
没有要连接的服务器或恶魔,而只是要打开的文件.所以,没有什么可以安装的.

SQLite is not really a DBMS, but more like a flat file with some API to operate it in the manner of SQL database.
there is no server or demon to connect to, but merely a file to open. So, there is nothing to install.

只安装 PHP,然后在 php.ini 中取消 SQLite 模块的注释.
然后只需在您的代码中打开 sqlite 文件.
仅此而已.

Install PHP only and then uncomment SQLite module in php.ini.
Then just open sqlite file in your code.
That's all.

这篇关于使用php连接到sqlite数据库的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆