You are here: Re: Save PHP variables to a text file « PHP Programming Language « IT news, forums, messages
Re: Save PHP variables to a text file

Posted by Krustov on 10/01/07 10:51

<comp.lang.php>
<Lamer>
<Mon, 01 Oct 2007 02:30:39 -0000>
<1191205839.552662.43890@y42g2000hsy.googlegroups.com>

> I was wondering how to save PHP variables to a txt file and then
> retrieve them again.
>
> Example:
>
> There is an input box, after submitted the stuff that was written in
> the input box will be saved to a text file. Later on the results need
> to be brought back as a variable. So lets say the variable is $text I
> need that to be saved to a text file and be able to retrieve it back
> again.
>

$filename="zonoff/demo.php"; $fp=fopen($filename,"w");
fwrite ($fp,"<?php"); fwrite ($fp,"\n");
fwrite ($fp,$james); fwrite ($fp,"\n");
fwrite ($fp,"?>"); fwrite ($fp,"\n");
fclose($fp);

<?php
$filename="zonoff/demo.php"; $fp=fopen($filename,"r");
$qaz=fgets($fp);
$qaz=fgets($fp); $bond=trim($qaz);
fclose($fp);
?>


--
(c) The Amazing Krustov

 

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

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