I have an issue with require a file in a directory. E.g I want to require a file in the directory /vendor/autoload.php
require_once __DIR__ . '/vendor/autoload.php';
use ipinfo\ipinfo\IPinfo;
$access_token = '3278463abc';
$settings = ['cache_disabled' => true];
$client = new IPinfo($access_token);
$ip_address="000.000.00.00.0";
$details = $client->getDetails($ip_address);
$details->loc;
I get the error:Failed opening required /home2/malesbarbercom/public_html/wp-content/plugins/insert-headers-and-footers/includes/vendor/autoload.php (include_path=.:/opt/alt/php81/usr/share/pear:/opt/alt/php81/usr/share/php:/usr/share/pear:/usr/share/php)
Why does it add “/wp-content/plugins/insert-headers-and-footers/includes/
” in the directory output? And what is the solution?