'Define URL in PHP File throw error in featured PHP Version
I have a file called web.php inside that file I store code for define base URL address, assets folder.... File have next code:
<?php
define('BASE', 'https://example.com/');
define('ASSETS', BASE . 'assets/');
?>
So if we call function from above <?php echo BASE; ?>home.php i get error that says, check above.
All works fine but get an error that says, you need to change `BASE` it will throw an error in featured PHP Versions. I try to define different names, but same error. Can someone explain to me, how I can resolve this issue?
Solution 1:[1]
Im trying to repeat your Error
And as i see there no Errors at all
My PHP version is 7.4.3
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
define('BASE', 'https://example.com/');
define('ASSETS', BASE . 'assets/');
echo BASE;
echo "No errors";
Is it really php throw or may by it comes from your Framework?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
