On Thu, Mar 12, 2009 at 14:51, Alice Wei <aj...@alumni.iu.edu> wrote:
> Warning: file_get_contents() expects parameter 1 to be string, resource
> given in C:\Inetpub\wwwroot\test\hello.php on line
> 18

    Freshman mistake.

    $file2 = fopen($copydir . "/play.txt", "w+");

    You're trying to read a data stream in file_get_contents() that
was opened with fopen().  Don't.

    Instead, replace the line of code above with:

    $file2 = $copydir.'/play.txt';

    .... and then RTFM on how to use file_get_contents().

</Daniel P. Brown>
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW10000

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to