|
Posted by Steve on 10/06/06 19:50
<mypipeline@googlemail.com> wrote in message
news:1160160830.745257.173080@h48g2000cwc.googlegroups.com...
| Sorry but I'm quite new to Php programming. I've written a short simple
| script that tries to look for patterns in a long txt file:
|
| $quotestxt = "$DOCUMENT_ROOT/quotes.txt";
| $quotes_file = fopen($quotestxt, 'r+');
| while (fread($quotes_file, 1024)) {
| $pattern = '^[\"]';
| $quote_roster = preg_match($pattern, $quotes_file);
| print_r($quote_roster);
| }
|
| however I get the error message
| Parse error: parse error, unexpected T_VARIABLE in line:
| $quotestxt = "$DOCUMENT_ROOT/quotes.txt";
|
| i've been to the manual but can't find what i'm looking for. can anyone
| help?
|
| Pipes
well, you left out the line number in the error message. it is safe to
assume that any time you get the T_VARIABLE parse error, you should find the
line number that the error specifies. then, look at the previous lines
(usually the one immediately above) until you see a line of code not ended
with either a ; but some times (rarely) a missing } or php tag (?>).
hth.
Navigation:
[Reply to this message]
|