Reply to Re: include part of a text file

Your name:

Reply:


Posted by gardnern on 03/10/06 06:41

Assuming "&content=" isnt anywhere else in the txt file, you could use
PHPs explode function like so...

<?php
$textfile= "/usr/local/something.txt";
$handle = fopen($textfile, "r");
$contents = fread($handle, filesize($textfile));
fclose($handle);

$content = explode("&content=", $contents);
print($content[1]);
?>

fopen function..
http://www.php.net/manual/en/function.fopen.php

fread function...
http://www.php.net/manual/en/function.fread.php

explode function...
http://www.php.net/manual/en/function.explode.php

-Nathan

[Back to original 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

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