With $GLOBALS it might solve your problem.
$GLOBALS is a PHP super global variable which is used to access global variables from Anywhere in the PHP script (also from Within functions or methods).
Would something like this:
$GLOBALS['BASEDIR'] = '/seus/assets';
And on your front:
<link rel='stylesheet' href='<?php echo $GLOBALS["BASEDIR"];?>/css/qualquer.css'/>
In all your Assets, you use the same expression for the dir base:
<?php echo $GLOBALS["BASEDIR"];?>
Hence, if by chance your folder structure changes, you just need to change the GLOBALS base.
I hope I’ve helped.
I don’t understand, if you want to set your own base path, you can do with, for example,
$base = "http://exemplo.com/caminho"; require "$base/style.css";
– Costamilam
@Guilhermecostamilam show! and this right there I wanted. And what I researched and I was doing with FILE and DIR.
– Pablo ̶F̶r̶o̶z̶