FTP

From: Date: Thu, 31 Aug 2006 22:29:35 +0000
Subject: FTP
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-7188@lists.php.net to get a copy of this message
Hello Steph <?php if (!class_exists('gtk')) {
       die('Please load the php-gtk2 module in your php.ini' . "\r\n");
} function watch_foo($fp, $condition) {
       echo ftell($fp);
       //update progess bar
} $file = "Firefox.rar"; $fp = fopen($file, "r"); $conn_id = ftp_connect($server); $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); [ gtk::io_add_watch($fp, Gtk::IO_IN | Gtk::IO_ERR, 'watch_foo'); ] ftp_fput($conn_id, $file, $fp, FTP_ASCII); [ gtk::io_add_watch($fp, Gtk::IO_IN | Gtk::IO_ERR, 'watch_foo'); ] gtk::main(); fclose($fp); ?> Between the brackets are possible locations of io_addwatch but when I run it PHP issues this: PHP Warning: ftp_fput(): Firefox.rar: Permission denied in C:\PHP\ftp.phpw on l ine 25 Warning: ftp_fput(): Firefox.rar: Permission denied in C:\PHP\ftp.phpw on line 2 5 0 --> this zero I believe that PHP has called the watch_foo Tricky stuff isn't it? Going to resume this tomorrow 8-) Happy php coding :-D Pedro

« previous php.gtk.general (#7188) next »