Strange problem on reading file

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
petrika
Forum Newbie
Posts: 2
Joined: Sun Oct 02, 2011 11:53 am

Strange problem on reading file

Post by petrika »

Hi everyone,
i am new to php an i have to parse a file which is defined ad follows :

<content email="some mail">
<![CDATA[<font size='24' color='#d3a91c'><b>CONTACT DETAILS</b></font>
#
<font color='#d3a91c'>If you have any questions please don’t hesitate to send us a message:</font>
]]>
</content>
I want to manipulate where at the # to insert dynamically my text retrieved from a form. i was looking php file functions in order to get # position and as a start i copy all the text to a string using
$content=file_get_contents("my file");
echo($content);
when i print it doesnt print anything. the problme is that it can read the particular text into the file,when i add other caracters in the file the methods works,as it should be.
My question is ,can one help me to manipulate my text file in order to write at the begining of # so i can populate my file without changing its structure?
Best Regards,
petrika
Forum Newbie
Posts: 2
Joined: Sun Oct 02, 2011 11:53 am

Re: Strange problem on reading file

Post by petrika »

Partially solved,the problem was that filegetcontents works ok but since the output is html formated i could see on web browers...
Thanks
Post Reply