You are here: Re: run php on a script, from a script « PHP Programming Language « IT news, forums, messages
Re: run php on a script, from a script

Posted by Fred Paris on 10/01/62 11:39

On Wed, 08 Feb 2006 16:33:41 GMT, "d" <d@example.com> wrote:

>function runphp($in_fn, $out_fn) {
> ob_start();
> include($in_fn);
> $c=ob_get_contents();
> ob_end_clean();
> $fp=fopen($out_fn, "wb");
> fwrite($fp, $c);
> fclose($fp);
>}
>
>That's very simple, of course. If something isn't exactly right in how it's
>called, it'll fail most spectactularly :) It gives you the general jist,
>though - using output buffering to capture the output of a given script, and
>then storing that output in a file.
>
>Let me know if there's something you don't understand.



Thanks !
I'll try that !

 

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

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