我已经定义了包含文件的路径,但使用定义路径包含它们不起作用

I am currently building a beginner project in PHP. I am trying to define the File Paths inside initialize.php.

when I access the page, I get this error

require_once(): Failed opening required './shared/staff_header.php' (include_path='.:/usr/lib/php7.2') in /homepages/36/d767628852/htdocs/phpstudy/learn/public/staff/index.php on line

I have tried to include the file using $_SERVER['DOCUMENT_ROOT'] and it works, but defining them does not work

Here is the code in initialize.php

define("PRIVATE_PATH", dirname(_FILE_));
define("PROJECT_PATH", dirname(PRIVATE_PATH));
define("PUBLIC_PATH", PROJECT_PATH .'/public');
define("SHARED_PATH", PRIVATE_PATH .'/shared');

Here is my index.php

require_once $_SERVER['DOCUMENT_ROOT'].'/private/initialize.php';
$page_title = "Staff Menu";
require_once(SHARED_PATH . '/staff_header.php');

I then get this error

require_once(): Failed opening required './shared/staff_header.php' (include_path='.:/usr/lib/php7.2') in /homepages/36/d767628852/htdocs/phpstudy/learn/public/staff/index.php on line