Hello.
I have a txt file with some variable names in it. Is
there any way to take the value of the variable
through php.
Thank you.
Help. read text file with variable names.
Moderator: General Moderators
not sure if this is what you are trying to get at, but you could always include the file ....
then the variables should be available to use in your script.
Code: Select all
include "file.ext";You have to save it in .php if you have wrote the variables in PHP like
inc.php
index.php
inc.php
Code: Select all
<?php
$VARIABLE1 = "VALUE1";
$VARIABLE2 = "VALUE2";
?>Code: Select all
<?php
include("inc.php");
echo $VARIABLE1;
?>