Kapitanluffy
New member
i have this code in my config.php file (the file to be included)
--
<?php
$var='Sample String';
?>
--
and when i include it on another php file like this
--
<?php
include 'config.php';
echo $var;
?>
--
or like this
--
<?php
include('config.php');
echo $var;
?>
--
take note that i also tried double quotes..
it shows me this error :|
--
Notice: Undefined variable: var in G:\xampp\htdocs\test\index.php on line 3
--
been searching for answers all day, thanks for a reply :3
--
R-G did'nt work
i recopied and put it in other folders, made new files, renamed gawd it worked :|
i don't know why but maybe config.php is reserved or something..i renamed it to dbcf.php
thanks guys
--
<?php
$var='Sample String';
?>
--
and when i include it on another php file like this
--
<?php
include 'config.php';
echo $var;
?>
--
or like this
--
<?php
include('config.php');
echo $var;
?>
--
take note that i also tried double quotes..
it shows me this error :|
--
Notice: Undefined variable: var in G:\xampp\htdocs\test\index.php on line 3
--
been searching for answers all day, thanks for a reply :3
--
R-G did'nt work
i recopied and put it in other folders, made new files, renamed gawd it worked :|
i don't know why but maybe config.php is reserved or something..i renamed it to dbcf.php
thanks guys