URL variable from text file
Posted: Mon Mar 30, 2009 1:09 am
Is there a way to read the content of a text into a url variable?
Ex: Read "This is the information." from file info.txt
So I would have a variable $a = the line read from the text file.
URL would be header( 'Location: http://somehost.com/test.php?parm1='.$a);
Here is what I tried:
$source = "info.txt";
$a = file_get_contents($source);
header( 'Location: http://somehost.com/test.php?parm1='.$a);
But it doesnt seem to pass anything in the variable. Reason for needing to do this is I have PHP write the file info.txt after files are uploaded (file contains a list of the files that were just uploaded), I then need to pass that list to another page for sending an email confirmation of what files were uploaded.
Thanks in advance,
T.
Ex: Read "This is the information." from file info.txt
So I would have a variable $a = the line read from the text file.
URL would be header( 'Location: http://somehost.com/test.php?parm1='.$a);
Here is what I tried:
$source = "info.txt";
$a = file_get_contents($source);
header( 'Location: http://somehost.com/test.php?parm1='.$a);
But it doesnt seem to pass anything in the variable. Reason for needing to do this is I have PHP write the file info.txt after files are uploaded (file contains a list of the files that were just uploaded), I then need to pass that list to another page for sending an email confirmation of what files were uploaded.
Thanks in advance,
T.