Email address obfuscation in effect -- please
click here to turn it off.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
What language are you scripting in?
In PHP you could do something like this:
<?php
$content = fread( $fp, filesize( $filename ) );
?>
The first parameter is, as usual, a pointer to a file. Second
parameter is the number of bytes that should be read in by the
function. Usually, when we need to read the whole file, we use the
filesize() function to help this matter. It will return the total
bytes of the given file. So, then fread() gets its second parameter as
total number of bytes. It places the content of the whole file pointed
by $fp in the $content variable. You may use $content to do any type
of processing as now it has the all ingredients of the file.
Taken from
http://codewalkers.com/tutorials/57/5.html
As with most things there is more than one way to skin a cat, I am
sure others on this site will have other ideas as well.
On 7/23/05, Ali Siavosh-Haghighi <EMAIL:PROTECTED> wrote:
> Hi every body,
> I'm trying to get a script to run and I got a question:
> How can I read a variable from a text file or a program and make in a
> script variable?
> thanks for your help
> Ali Siavosh
>
> _______________________________________________
> members mailing list
> EMAIL:PROTECTED
> http://mlug.missouri.edu/mailman/listinfo/members
>
--
Thanks
F Vernon Green
_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members