I'm using the following to define root while in development:
define('LOCAL_URL', 'http://localhost/~xampp/Mysite');
define('REMOTE_URL', 'http://example.com');
define('DEV_VERSION', true);
if(DEV_VERSION)
define('URL', LOCAL_URL);
else
define('URL', REMOTE_URL);
This concept is new to me and I'm a bit of a PHP beginner so please be gentle.
I'm trying to use 'URL' in 'require_once' and I can't seem to get it to work (as in the required file is not included). I've tried the following:
require_once URL.'/phpincludes/coming-events.php';
require_once(URL.'/phpincludes/coming-events.php');
require_once URL . '/phpincludes/coming-events.php';
require_once (URL . '/phpincludes/coming-events.php');
require_once(URL.'phpincludes/coming-events.php');
I've checked http://www.php.net/manual/en/function.require-once.php and have searched on Stackoverflow and I'm not really making any headway at all.
I'm sure it's a really stupid and basic error I'm making here, but I'm at a loss and would really appreciate some help!
<base href=...>
to compensate). – Brnaby<img src="<?php echo URL ?>/images/something.jpg">
– Claritaclarity