In my application,I already set a variable like config in core.php such as
core.php
$websetting = array(
'mydomain' => $_SERVER['HTTP_HOST'],
'adminEmail' => 'admin@xyz.com',
'supportEmail' => 'support@xyz.com',
'infoEmail' => 'info@xyz.com',
'accountEmail' => 'accounts@xyz.com',
'facebook' => 'facebook.com/xyz',
'twitter' => 'twitter.com/@xyz'
);
Configure::write('WebsiteSetting', $websetting);
Now I create a one morning.php file in cj in webroot. So my path is like: webroot/cj/morning.php
In morning.php I try to read Configure::read('WebsiteSetting.mydomain')
.
<?php
echo Configure::read('WebsiteSetting.mydomain');
?>
What happened :