You are here: Re: file() « PHP Programming Language « IT news, forums, messages
Re: file()

Posted by Andy Hassall on 04/01/07 15:40

On 1 Apr 2007 02:07:27 -0700, cmk128@hotmail.com wrote:

>$lines = file('http://google.com');
>echo $lines[0];
>
>it doesn't work,

In what way does it not work? It works here:

andyh@server ~/public_html $ php -q test.php
<html><head><meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1"><title>Google</title><style><!--

Saying "doesn't work" on its own is completely unhelpful; what did you expect?
What actually happened?

>i want to echo the first line, how to?

You just did. Perhaps you want to do something else? Try being more precise;
first line of what?

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

 

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

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