Good morning, I'm starting in this PHP, I have a doubt, to add files to a php is necessary to do the following:
require_once '../rutafichero/fichero.php';
My question is, assuming that at some point you have to change the name of the file path or the same name of the file and you do not want to be updating all the PHP that include that file, there is some way to put a constant instead of the route? For example do the following:
define('fichero','../rutafichero/fichero.php');
and then
require_once fichero;
I tried it but it marks me an error, so I turn to ask if there is any way to do what I try.
Thank you in advance to everyone.
PS: Working with Windows and PHP 7.