Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #3212
| Date | 2011-09-25 20:39 +0200 |
|---|---|
| From | Luuk <Luuk@invalid.lan> |
| Newsgroups | comp.lang.php |
| Subject | Re: file_get_contents() on Windows 7 |
| References | <2k44l8-qlt.ln1@luuk.invalid.lan> <slrnj7up59.hbg.hellsop@nibelheim.ninehells.com> <de84l8-jtu.ln1@luuk.invalid.lan> |
| Message-ID | <l394l8-v3v.ln1@luuk.invalid.lan> (permalink) |
On 25-09-2011 20:27, Luuk wrote:
> On 25-09-2011 19:28, Peter H. Coffin wrote:
>> On Sun, 25 Sep 2011 19:22:42 +0200, Luuk wrote:
>>> I am getting an error when using get_file_contents,
>>> i simplified my problem as below:
>>>
>>> C:\TEMP>dir>test
>>>
>>> C:\TEMP>php -e "echo get_file_contents('test', true); "
>>> Could not open input file: echo get_file_contents(test, true);
>>
>> Where is your file "echo get_file_contents('test', true); "? It is
>> obviously not in the current directory.
>
> hmmmm,
>
> too many errors on 1 line.... ;(
>
> and its not even monday!
>
> This works ok:
> c:\TEMP>php -r "echo file_get_contents('test');"
>
>>
i found the problem...
in my original code i was doing this to get the filename into $x:
$x = fgets($f);
and according to the manual the newline is included, so i had to strip
the last character of $x....
--
Luuk
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
file_get_contents() on Windows 7 Luuk <Luuk@invalid.lan> - 2011-09-25 19:22 +0200
Re: file_get_contents() on Windows 7 Luuk <Luuk@invalid.lan> - 2011-09-25 19:35 +0200
Re: file_get_contents() on Windows 7 "Peter H. Coffin" <hellsop@ninehells.com> - 2011-09-25 12:28 -0500
Re: file_get_contents() on Windows 7 Luuk <Luuk@invalid.lan> - 2011-09-25 20:27 +0200
Re: file_get_contents() on Windows 7 Luuk <Luuk@invalid.lan> - 2011-09-25 20:39 +0200
Re: file_get_contents() on Windows 7 Doug Miller <doug_at_milmacdotcom@example.com> - 2011-09-25 14:32 -0400
csiph-web