Php 调用未定义的函数authorize_user()

Php 调用未定义的函数authorize_user(),php,function,Php,Function,我有两个文件,'index.php'和'/includes/app_header.php' index.php <?php ini_set('display_errors', 1); error_reporting(E_ALL|E_STRICT); require('./includes/app_header.php'); authorize_user(); ?> app_header.php <? function authorize_user() {

我有两个文件,'index.php'和'/includes/app_header.php'

index.php

<?php

ini_set('display_errors', 1);
error_reporting(E_ALL|E_STRICT);

require('./includes/app_header.php');

authorize_user();

?>

app_header.php

<?   
function authorize_user()
{
    echo "Hello world!";
}
?>

这给了我以下错误:

致命错误:未捕获错误:调用filepath\index.php中未定义的函数authorize_user():8堆栈跟踪:#0{main}在filepath\index.php的第8行抛出


使用
require_once()
哪一种更有效地包含脚本?是否启用了短打开标记?@Rizier123非常感谢!成功了。