使用Thrift来让PHP操作Cassandra无疑是一个首选方案,但是配置和操作比较麻烦。

我们可以使用一个php的模块phpcassa来操作Cassandra。

我们先插入一些数据:

使用PHP来操作Cassandra

下载phpcassa:http://github.com/downloads/hoan/phpcassa/phpcassa-0.1.zip

解压缩,放到项目的include目录下。

写一个php文件,内容如下:

 使用PHP来操作Cassandra

 运行后结果如下:

Array ( [age] => 28 [first] => jiang [last] => yujie )

相关文章:

  • 2021-10-25
  • 2021-06-11
  • 2022-01-05
  • 2021-12-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-07
  • 2021-07-05
  • 2022-12-23
  • 2021-11-17
  • 2021-04-19
相关资源
相似解决方案