You are here: Fopen() error: can anybody help? « All PHP « IT news, forums, messages
Fopen() error: can anybody help?

Posted by mypipeline on 10/06/06 18:53

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация