about php expect question

From: Date: Tue, 11 Dec 2007 17:42:00 +0000
Subject: about php expect question
Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-4961@lists.php.net to get a copy of this message
Hello , I can run: php fopen2.php , It can work. but , I "cp fopen2.php /usr/local/apache/htdocs" , and chmod 777 fopen2.php. open http://localhost/fopen2.php. It can't work ,why ? ( I have been run : chmod -R 777 /root/temp/ ) peter fopen2.php code: <?php // Copies file from remote host: ini_set ("expect.timeout", 30); $stream = fopen ("expect://htdigest -c /root/temp/phpexpect3.txt cirratauser peter2", "r"); $cases = array ( array (0 => "password:", 1 => PASSWORD), array (0 => "password:", 1 => REPASSWORD) ); while (true) { switch (expect_expectl ($stream, $cases)) { case PASSWORD: fwrite ($stream, "password\n"); break; case REPASSWORD: fwrite ($stream, "password\n"); break; case EXP_TIMEOUT: case EXP_EOF: break 2; default: die ("Error has occurred!\n"); } } fclose ($stream); ?>

« previous php.pecl.dev (#4961) next »