file not picking values of variables placed in another file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
fadi
Forum Newbie
Posts: 10
Joined: Wed Mar 24, 2004 1:26 am
Location: Asia:Pakistan

file not picking values of variables placed in another file

Post by fadi »

hi!
i have 2 portions of site as usual others do have.Admin and User.
in the user section. all webpages of php are picking values defined in language files. But in the admin section providing proper path n everything..Values are just not visible even there is no error.
like
i have defined a variable in following way in file abc.php
-------abc.php------
<?php
$opt="Welcome Guest";
?>
-------End of abc.php------
in another file..
----------admn.php-------
<?php
require_once("../abc.php");
echo "{$opt}";
?>
--end of admn.php----
file admn is placed in administration folder and abc.php is placed in the root folder.
how can i do that ? i need immediate help plz....i've a deadline to meet :(...as always :d
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

did you try this?
require_once("/abc.php");
fadi
Forum Newbie
Posts: 10
Joined: Wed Mar 24, 2004 1:26 am
Location: Asia:Pakistan

Post by fadi »

yes. i tried that one also .but it dint work. there was an error that u dont have permission . i did set permissions to each folder n file to 777 ...but still dint work.... it gives no error at ("../abc.php"); but also doesnt get values...
Post Reply