我使用变量来回显不同页面的不同标题,但出现错误

i use a variable to echo the different title of different pages but i got an error

[我在使用变量 ( $page_title ) 回显页面标题时出错,但它不起作用并向我显示错误] [这里是header.php文件的代码]

<head>
    <meta charset="UTF-8">
    <title><?php echo $page_title; ?></title>
    <meta name="description" content="sodalitesolutions">
    <meta name="author" content="sodalitesolutions">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/bootstrap/css/bootstrap.css'); ?>">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/font-awesome/css/font-awesome.css'); ?>">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/style/slider.css'); ?>">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/style/mystyle.css'); ?>">
</head>

[错误::函数:_error_handler]

尝试添加这个:

$this->data['title'] = 'test';
$this->load->view('view_name',$this->data);