How can I detect, using php, if the machine has oracle (oci8 and/or pdo_oci) installed?

如果机器安装了oracle (oci8和/或pdo_oci),如何使用php检测?

I'm working on a PHP project where some developers, such as myself, have it installed, but there's little need for the themers to have it. How can I write a quick function to use in the code so that my themers are able to work on the look of the site without having it crash on them?

我正在开发一个PHP项目,在这个项目中,一些开发人员(比如我自己)已经安装了它,但是主题人几乎不需要安装它。如何编写一个在代码中使用的快速函数,使主题器能够处理站点的外观,而不会使其崩溃?

4 个解决方案

#1


4

if the oci extension isn't installed, then you'll get a fatal error with farside.myopenid.com's answer, you can use function_exists('oci_connect') or extension_loaded('oci8') (or whatever the extension's actually called)

如果oci扩展没有安装,那么farside.myopenid.com的答案会出现致命错误,您可以使用function_exists('oci_connect')或extension_loaded('oci8')

更多相关文章

  1. 移动数组PHP中的所有项目
  2. 项目实战7—Mysql实现企业级数据库主从复制架构实战
  3. 【Java Web】简易商品信息管理系统——首个Web项目
  4. 从零开始搭建框架SSM+Redis+Mysql(二)之MAVEN项目搭建
  5. 利用Intellij+MAVEN搭建Spring+Mybatis+MySql+SpringMVC项目详解
  6. 装机建项目vs2017和mysql5.7下建项目用EF建实体模型的过程..
  7. 获取项目列表的更好方法:缓存序列化数据与数据库查询或其他?
  8. linux系统下安装多个MySql数据库并做主从配置(个人项目经验)
  9. web项目异常A web application registered the JBDC driver [com

随机推荐

  1. 天猫双11数据过于完美?我们用python来看看
  2. 说点掏心窝子的话。
  3. 我被创业导师 PUA 了!
  4. 别再问如何用Python提取PDF内容了!
  5. 入职工作之后,我才明白的事。
  6. Python数据分析实战:缺失值处理
  7. 数据分析实战:母婴商品分析
  8. pandas数据处理
  9. 给女朋友讲了讲 V8 引擎的“回调函数”!
  10. Android解决ViewPager嵌套ViewPager中多