Related documents:
- http://php.net/manual/en/function.include.php
- http://forum.arvixe.com/smf/general/php-script-errors/
vars.php:
<?php
$color = ‘green’;
$fruit = ‘apple’;
?>
index.php:
<?php
define(‘BASE_PATH’,’c:/hostingspaces/shai/shai-arvixe.com/wwwroot/’);
include BASE_PATH . ‘inc/vars.php’;
echo “A $color $fruit”; // A green apple
?>
Result and expected output:
A green apple