HOME BLOG PORTFOLIO PHOTO CONTACT
How can we run Php code as desktop application without browser/webpage like vb? PHP GTK!

How can we run Php code as desktop application without browser/webpage like vb? PHP GTK!
STEP1: Close eye for 20 seconds.
STEP2: Open eye.
STEP3: Download this file : http://gtk.php.net/do_download.php?download_file=php-gtk-2.0.1.tar.gz
STEP4: Run this downloaded .exe file on double click it, after successfully run.

{code type=codetype}
STEP5: Make a file abc.php and save it inside C:abc.php
content of abc.php=
<?PHP
if (!class_exists(‘gtk’)) {
die(“Please load the php-gtk2 module in your php.inirn”);
}
$wnd = new GtkWindow();
$wnd->set_title(‘Hello world’);
$wnd->connect_simple(‘destroy’, array(‘gtk’, ‘main_quit’));
$lblHello = new GtkLabel(“hello JAYhello JAYhello JAYhello JAYhello JAYhello nJAYhello JAYhello JAYhello JAYhello JAYhello JAYhello JAYhello JAYhello JAYhello JAYhello JAYhello JAYhello JAY”);
$wnd->add($lblHello);
$wnd->show_all();
Gtk::main();
?>

STEP6: C:>php abc.php (run it in command promt go Start-Run-cmd then C:>php abc.php)
{/code}
STEP7: Be enjoy program its run successfully (see screen shot below).

STEP8: Download link is : http://gtk.php.net/download.php

you have to save and run inside C:
Resource: http://devzone.zend.com/article/2654 (This is called PHP GTK)

   Share on Facebook

Page views:261