Re: reading a file into variable for using in a javascript
| From: | Madhusudhana Rao Sunkara | Date: | Mon, 09 Jun 2003 09:11:44 +0000 |
| Subject: | Re: reading a file into variable for using in a javascript | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-150729@lists.php.net to get a copy of this message | ||
you could try using file() or readfile(). while file reads the content of the file in to an array, readfile reads a file and writes it to the output buffer.
-
Madhu
Charles Kline wrote:
Hi all, I am reading the content of a text file into a variable to be used in a javascript. I am reworking some code that was originally done using ColdFusion and the jsStringFormat(var) function. What is the PHP equivalent string function? Is there one? I have searched the docs, but can't figure out which to use. Thanks Charles