Re: Read and Escape file
| From: | Miguel Cruz | Date: | Fri, 05 Apr 2002 07:50:20 +0000 |
| Subject: | Re: Read and Escape file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-91665@lists.php.net to get a copy of this message | ||
On Thu, 4 Apr 2002, Weston Houghton wrote:
> I'm thinking then of reading these text files into php through filesystem
> functions, turning the template into a string assigned to a php variable. Is
> there anyway I can do this and escape any elements in the file that might
> terminate the string? So if the file contains a quote (") that it does not
> kill the string?
Strings can contain any character.
Certain characters have special meanings in string literals (that is,
strings you explicitly type into your PHP source code) but if you get them
in via other means (reading from file, reading from form submissions,
etc.) then they are not treated specially.
miguel