note 9509 modified in function.popen by irchtml

From: Date: Mon, 23 Feb 2004 08:27:59 +0000
Subject: note 9509 modified in function.popen by irchtml
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-65573@lists.php.net to get a copy of this message
Try this (if you're familiar with vi editor) : <?php $f=popen("vi newfile.txt","w"); sleep(1); fputs($f,"i"); // insert sleep(1); fputs($f,"Hello world\r"); // write the text to vi Editor sleep(1); fputs($f,chr(27)); // cancel action sleep(1); fputs($f,":wq\r"); // write and quit pclose($f); // back to php exit; ?> heh heh heh, LexZEUS --was-- Try this (if you're familiar with vi editor) : &lt;? $f=popen("vi newfile.txt","w"); sleep(1); fputs($f,"i"); // insert sleep(1); fputs($f,"Hello world\r"); // write the text to vi Editor sleep(1); fputs($f,chr(27)); // cancel action sleep(1); fputs($f,":wq\r"); // write and quit pclose($f); // back to php exit; ?> heh heh heh, LexZEUS http://www.php.net/manual/en/function.popen.php

« previous php.notes (#65573) next »