plz help me.
Code: Select all
<?php
function gettxt($datafile)
{
file_get_contents($file) or die('Could not read file!');
}
$first = gettxt(\first.txt);
echo $first
?>I get this
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in E:\MiniComp\04 - Media\02 PROGRAMMING\html\Child care\finish\php559.tmp on line 9
Notice: Use of undefined constant first - assumed 'first' in E:\MiniComp\04 - Media\02 PROGRAMMING\html\Child care\finish\php559.tmp on line 9
Notice: Use of undefined constant txt - assumed 'txt' in E:\MiniComp\04 - Media\02 PROGRAMMING\html\Child care\finish\php559.tmp on line 9
Notice: Undefined variable: file in E:\MiniComp\04 - Media\02 PROGRAMMING\html\Child care\finish\php559.tmp on line 7
Could not read file!
------------------------------------
LINE 9 $first = gettxt(\first.txt);
LINE 7 file_get_contents($file) or die('Could not read file!');
--------------------------------------
What I want to do is to change the content of my site by changing the txt file. If you have a better why to do it plz tell me.