You have to put the path to the file. For example:
require_once('../web/a.php');
You cannot get the file to require it from internet (with http protocol) it's restricted. The files must be on the same server. With Possibility to see each others (rights)
Dir-1 -
> Folder-1 -> a.php
Dir-2 -
> Folder-2 -> b.php
To include a.php inside b.php => require_once('../../Dir-1/Folder-1/a.php');
To include b.php inside a.php => require_once('../../Dir-2/Folder-2/b.php');