RE: Getting the contents of a file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm



On 25 November 2004 10:11, Octavian Rasnita wrote:

> Hi all,
> 
> I am trying to use the file() function, but without success.
> 
> Here is the code:
> $url = "http://www.rasd.ro/Quotes/11-24-2004.txt";

You have no semicolon on the end of the above line.

> $file = file($url);

So the $file at the beginning of this line is a parse error.
 
> And this is the error:
> PHP Parse error:  syntax error, unexpected T_VARIABLE in [FILE] on
> line 13 

PHP can only tell you the line on which it first detects an error (13, in
this case); the actual error may be on a previous line (12, in this case).

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: m.ford@xxxxxxxxxxxxxx
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux