严重性:8192消息:与其类同名的方法将不是PHP的未来版本中的构造函数;
作者:互联网
严重程度:8192
消息:与其类同名的方法将不是PHP的未来版本中的构造函数; CI_Pagination有一个不推荐使用的构造函数
文件名:libraries / Pagination.php
行号:27
class CI_Pagination {
var $base_url = ''; // The page we are linking to
var $total_rows = ''; // Total number of items (database results)
var $per_page = 10; // Max number of items you want shown per page
var $num_links = 2; // Number of "digit" links to show before/after the currently viewed page
var $cur_page = 0; // The current page being viewed
var $first_link = '‹ First';
var $next_link = '>';
var $prev_link = '<';
var $last_link = 'Last ›';
var $uri_segment = 3;
var $full_tag_open = '';
var $full_tag_close = '';
var $first_tag_open = '';
var $first_tag_close = ' ';
var $last_tag_open = ' ';
var $last_tag_close = '';
var $cur_tag_open = ' ';
var $cur_tag_close = '';
var $next_tag_open = ' ';
var $next_tag_close = ' ';
var $prev_tag_open = ' ';
var $prev_tag_close = '';
var $num_tag_open = ' ';
var $num_tag_close = '';
var $page_query_string = FALSE;
var $query_string_segment = 'per_page';
解决方法:
以前我们曾经使用类名本身来声明类构造函数
Class A
{
public function a(){
}
}
现在你需要将a()改为构造,就像这样
public function __construct(){
}
而错误将消失.
标签:codeigniter-3,php,codeigniter,codeigniter-2 来源: https://codeday.me/bug/20190722/1502163.html