JAY BHARAT, software enginer, php programmers, software engineer, jay bharat ,9844542127

 
»
S
I
D
E
B
A
R
«
How can we run Php code as desktop application without browser/webpage like vb? PHP GTK!
October 23rd, 2009 by admin

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.

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.ini\r\n");
}
$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)

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)

PHP GTK

PHP GTK


One Response  
Pradeep Yadav writes:
March 31st, 2010 at 10:45 pm

There is no one downloaded.exe file for run. It is an folder of files.
Please give me the path to run this file and where is the downloaded.exe file.

Leave a Reply