Its very easy to install PHP GTK in Windows . Its simple in three steps-
- Download the zip file from http://gtk.php.net/download.php: php-gtk-2.0.0 Windows binary pack
- Extract the zip file. You will see a folder called "php-gtk2".
- That's it! Yes, that's it! PHP-GTK v2.0 is now ready to run!
How to test?
Suppose you extracted your PHP GTK in your C drive like C:\php-gtk\ . Now you can simply test your PHP GTK with the help of a test script.
Create test.php and paste following code in this-
<?php
$window = new GtkWindow();
$window->connect_simple('destroy', array('Gtk','main_quit'));
$label = new GtkLabel("hello world!");
$window->add($label);
$window->show_all();
Gtk::main();
?>
Now type in your command prompt-
c:\php-gtk\php test.php
It will open a window with a label of Hello World.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.