Page 1 of 1

file_get_contents problem

Posted: Fri Oct 10, 2008 3:34 pm
by Quinton_Heckroth
This is a problem which is really bugging me.

I've created a script to create a new file and fwrite() it's contents with that of another web page - should be straight forward right?

The problem comes when fwrite() is omitting the PHP from the content I'm copying, this means important PHP to carry over sessions are lost when creating the new file. I'm not sure whether this is a noted problem that PHP can't fwrite more PHP, or whether I'm missing any Doc Type information.

If anyone could help, provide a solution or point me in the right direction I'd be very grateful!

Thank-you, Quinton

Re: file_get_contents problem

Posted: Sat Oct 11, 2008 7:00 pm
by koen.h
Am I right that you are wanting to do the following: read file A, get contents, copy contents to file B?

If so could you post your code here?