Strange problem on reading file
Posted: Sun Oct 02, 2011 12:01 pm
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,
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,