Easy Contact Forms 插件不适用于 PHP 5.5.9 [英] Easy Contact Forms plugin does not work with PHP 5.5.9

查看:33
本文介绍了Easy Contact Forms 插件不适用于 PHP 5.5.9的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

WordPress 插件 Easy Contact Forms 不适用于 WordPress 3.9 和 PHP 5.5.9

The WordPress plugin Easy Contact Forms doesn't with WordPress 3.9 and PHP 5.5.9

它不显示表单字段,您也不能编辑,也不会在网站中显示表单.

It doesn't show the form fields, nor you can edit, and it won't show the form in the website.

我注意到是因为它给了我这个错误:

I notice because it gives me this error:

Ajax 错误.Status =error 内部服务器错误

Ajax error. Status =error Internal Server Error

我查看了日志文件,发现错误在文件中:easy-contact-forms/easy-contact-forms-database.php 在第 152 行,由于函数 mysql_real_escape_string

I look at the log files and see the error is in the file: easy-contact-forms/easy-contact-forms-database.php at line 152, due to the function mysql_real_escape_string

我尝试使用另一个类似的函数,但要么不起作用,要么删除数据,要么对每个查询都不起作用.

I tried to use another similar functions, but either doesn't work, or deletes data, or doesn't work for every query.

推荐答案

看了文件代码,发现这个插件做的并不完美,不一致.它改变了它的 MySQL 连接!

After watching the file code, you can realize that this plugin is not perfectly made, it's inconsistent. It changes it's MySQL connection !

一个快速修复,让它工作,(我知道这不是最好的方法):

One quick fix to make it work, (I know this is not the best way):

wptn 函数中添加:

mysql_connect('localhost', 'user', 'password');

像这样:

function wptn($query) {

        global $wpdb;

        mysql_connect('localhost', 'myuser', 'mypassword');
        $query = str_replace("#wp__", $wpdb->prefix, $query);
        return $query;

    }

这篇关于Easy Contact Forms 插件不适用于 PHP 5.5.9的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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