file_get_contents problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Quinton_Heckroth
Forum Newbie
Posts: 1
Joined: Fri Oct 10, 2008 3:27 pm

file_get_contents problem

Post 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
koen.h
Forum Contributor
Posts: 268
Joined: Sat May 03, 2008 8:43 am

Re: file_get_contents problem

Post 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?
Post Reply