You are here: Re: include part of a text file « PHP Programming Language « IT news, forums, messages
Re: include part of a text file

Posted by NC on 03/10/06 18:29

brianwalker@i-rent.us wrote:
>
> when i use the php command <?php include ("info.txt"); ?>

There's no need to use include() for anything other than PHP files. If
you just want to output the contents of the file, use readfile()
instead.

> Is there any way to use php to just display what
> apprars after the &content= in my text file.
....
> "
> title=CDN HOME &content=The COMPUTER DONATION NETWORK
> is a resource of new, used and refurbished computer equipment, software,
> networking gear and lab furnishings for "

Yes:

list(, $content) = explode('&content=', file_get_contents('info.txt'));

echo $content;

Cheers,
NC

 

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

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