这是PHP的一个子计划,目的要使php成为一种标准的编程语言而非单纯的脚本语言。
使用PHP-GTK可以在图形界面的系统中编写图形界面的应用程序,使用php编写应用的客户端。这样服务器端、客户端都可以使用php来编写了。

解决方案 »

  1.   

    斑竹斑竹我爱你~~:)有关于GTK的好点的文档(中文)或者网站(中文)吗??给我邮一份好不好~~:)[email protected]
      

  2.   

    現在國內這方面的站點好像還沒有,就只有國外站點了,可惜我的e文太poor,呵呵,各位的呢?
    http://gtk.php.net
    http://www.gtk.org
    http://gtk-gnutella.sourceforge.net/
    http://gtk.php-coder.net
    http://phpklik.dhs.org/phpgtk/ 
    http://www.phpuk.org/gtk
      

  3.   

    PHP-GTK Hello World的例子<? 
    if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') 
        dl('php_gtk.dll'); 
    else 
        dl('php_gtk.so'); /* 
    * Called when delete-event happens. Returns false to indicate that 
    * the event should proceed. 
    */ 
    function delete_event() 

        return false; 
    } /* 
    * Called when the window is being destroyed. Simply quit the main loop. 
    */ 
    function destroy() 

        Gtk::main_quit(); 
    } /* 
    * Called when button is clicked. Print the message and destroy the 
    * window. 
    */ 
    function hello() 

        global    $window; 
        print "Hello World!\n"; 
        $window->destroy(); 
    } /* 
    * Create a new top-level window and connect the signals to the 
    * appropriate functions. Note that all constructors must be 
    * assigned by reference. 
    */ 
    $window = &new GtkWindow(); 
    $window->connect('destroy', 'destroy'); 
    $window->connect('delete-event', 'delete_event'); 
    $window->set_border_width(10); /* 
    * Create a button, connect its clicked signal to hello() function and 
    *  add the button to the window. 
    */ 
    $button = &new GtkButton('Hello World!'); 
    $button->connect('clicked', 'hello'); 
    $window->add($button); /* 
    * Create a new tooltips object and use it to set a tooltip for the 
    * button. 
    */ 
    $tt = &new GtkTooltips(); 
    $tt->set_delay(200); 
    $tt->set_tip($button, 'Prints "Hello World!"', ''); 
    $tt->enable(); /* 
    * Show the window and all its child widgets. 
    */ 
    $window->show_all(); /* Run the main loop. */ 
    Gtk::main(); 
    ?>  
      

  4.   

    寫好的php-gtk程序,怎么把他編譯成exe文件,用compiler成么?
      

  5.   

    现在还没有,还是用php.exe加相应参数运行按照pear的势头,估计会有compiler出现
      

  6.   

    不是已經有PHPCompiler了么?那就不用估計了吧.
      

  7.   

    PHP-GTK is a PHP extension that enables you to write client-side, cross-platform GUI applications. This is the first extension for PHP of its kind and was written in part to prove that PHP is a capable general-purpose language that is suited to more than just the web application environment. This extension will not allow you to display GTK+ applications in a web browser. It is intended for creating standalone GUI applications. 
    What is GTK+?
    A History of GTK+
    GTK+ was originally developed for GIMP, the GNU Image Manipulation Program. GTK+ stands for the GIMP Tool Kit. GTK+ has grown from these beginnings and is now used as a central part of Gnome, the GNU Projects desktop environment. GTK+ has also been ported to BeOS and Win32, which makes it the perfect choice to use as the basis for a PHP extension, keeping PHP as cross-platform as possible and allowing the creation of Windowed applications in PHP for Linux, BeOS and Windows. What does GTK+ do?
    GTK+ is a set of libraries written in C to create graphical user interfaces. It has an object oriented architecture developed in three libraries: 
    GLib provides various tools for use when programming with GTK+. GDK abstracts the low-level window drawing functions. GTK provides a set of widgets for use when creating your GUI. 
      

  8.   

    我也很想學gtk.不過我的E文實在.......哎...如果各位看到有gtk的中文网址或是中文教程,記得要告訴我喲.