[PHP-GTK] FTP
by Webmaster Phelios.org other posts by this author
Aug 31 2006 3:50PM messages near this date
[PHP-GTK] FTP
|
[PHP-GTK] FTP
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
--
PHP-GTK General Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Webmaster Phelios.org
Webmaster Phelios.org
Webmaster Phelios.org
Webmaster Phelios.org
Steph Fox
Steph Fox
|