Fatal error: Call to undefined function fnmatch() 解决
我的PHP版本是5.6.30,linux 是CentOS 6.6,nginx,也不知啥问题,看了官方:
https://secure.php.net/manual/en/function.fnmatch.php
上面有段警告:
Warning
For now, this function is not available on non-POSIX compliant systems except Windows. 大致意思fnmatch不能在除windows以外非POSIX系统上使用,
下面也贴出了相应替换的代码
```
<?php
if(!function_exists('fnmatch')) {
function fnmatch($pattern, $string) {
return preg_match("#^".strtr(preg_quote($pattern, '#'), array('\*' => '.*', '\?' => '.'))."$#i", $string); //这里用preg_quote替换了
} // end
} // end if
?>
```
官方给出了好几种替换方式,也是可行的,如果有直接的解决方案,务必告知我下,不胜感谢。
Fatal error: Call to undefined function fnmatch() 解决的更多相关文章
- Fatal error: Call to undefined function imagettftext()解决办法
Fatal error: Call to undefined function imagettftext()解决办法 我的问题是php编译安装时指定了gd的目录,其实不用指定.就可以了 博客分类: ...
- Fatal error: Call to undefined function json_decode()解决办法
最近搭建测试服务器,访问网站查看报错日志出现如下错误: Fatal error: Call to undefined function json_decode() 出现该问题原因是安装PHP时没有安装 ...
- Fatal error: Call to undefined function curl_init()解决办法
问题描述: 在Windows SERVER 2012RC 64 bit OS, php 5.6.3的环境下,搭建好了php运行环境.但是在调用 curl_init() 方法时却报错了. 检查了一下,p ...
- linux又一次编译安装gd,添加freetype支持,解决验证码不显示问题,Fatal error: Call to undefined function imagettftext()
问题: Fatal error: Call to undefined function Think\imagettftext() in /var/www/webreg/ThinkPHP/Library ...
- Fatal error: Call to undefined function mysql_connect()
我在进行PHP环境搭建:Windows 7下安装配置PHP+Mysql+apache环境时,之前都没有什么问题,只是在验证PHP是否能连接Mysql时出现如下错误:Fatal error: Call ...
- php连接mysql报错——Fatal error: Call to undefined function mysql_connect() in
练习php连接mysql数据库 代码:mysql_connect("127.0.0.1:3306","root", ..... 浏览器报错:Fatal erro ...
- "Fatal error: Call to undefined function: file_put_contents()"
打开页面时提示这个错误: Fatal error: Call to undefined function: file_put_contents() 意思是请求未定义的函数,出现这个提示通常有两种情况: ...
- fatal error: Call to undefined function mysqli_connect()
在搭建PHP5.6+APACHE2.4+MYSQL5的平台时,测试是否成功连接mysql, 测试程序index.php <?php phpinfo() ?> 没有出现mysql的信息 所以 ...
- php提示Fatal error: Call to undefined function imagecreate()
在php中imagecreate函数是一个图形处理函数,主要用于新建一个基于调色板的图像了,然后在这个基础上我们可以创建一些图形数字字符之类的,但这个函数需要GD库支持,如果没有开启GD库使用时会 / ...
随机推荐
- django notes 二:URL dispatcher
一般在 settings.py 中会有一个 ROOT_URLCONF ,请求到来时 django 会从 ROOT_URLCONF 指向的文件中查找 urlpatterns 变量配置的路由. url ...
- ZOJ 3607 Lazier Salesgirl
Kochiya Sanae is a lazy girl who makes and sells bread. She is an expert at bread making and selling ...
- GPU体系架构(一):数据的并行处理
最近在了解GPU架构这方面的内容,由于资料零零散散,所以准备写两篇博客整理一下.GPU的架构复杂无比,这两篇文章也是从宏观的层面去一窥GPU的工作原理罢了 GPU根据厂商的不同,显卡型号的不同,GPU ...
- C++ 隐含的this 指针
c++primer 页数:376-379 备份, 很有嚼头 #include <iostream> #include <string> #include <fstre ...
- 在myeclipse中换项目的jdk版本,你需要做哪些?
首先,我们必须把jdk在系统中安装好,环境变量配好,才能进行下一步的操作…… 然后在点击项目,右键选择Properties,找到Java Build Path,拉倒最下面,把原来的jdk版本给remo ...
- log4j.properties 基本配置
log4j.rootLogger=WARN,stdout,D log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender ...
- Autofac +webapi 配置
Autofac配置 using Autofac; using System; using System.Collections.Generic; using System.Linq; using Sy ...
- 使用 Python 管理 Azure:基础配置
Azure 提供了丰富的 Python SDK 来对 Azure 进行开发管理,包括使用 Azure 的开源框架在 Azure 上创建 web 应用程序,对 Azure 的虚拟机,存储等进行管理,本系 ...
- [转]字符编码笔记:ASCII,Unicode 和 UTF-8
本文非原创,转载 ,原文地址 :http://www.ruanyifeng.com/blog/2007/10/ascii_unicode_and_utf-8.html 作者: 阮一峰 日期: 20 ...
- 前端js动画收藏
值得收藏的动画