Displaying date on a client side window using PHP-GTK


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2.  
  3. $dttime = date('Y-m-d H:i:s');
  4. $label1 = "The date is ". $dttime;
  5.  
  6. function updatedate($button)
  7. {
  8. $button->date('Y-m-d H:i:s');
  9. return $this;
  10. }
  11.  
  12.  
  13. $win = new GtkWindow();
  14. $button = new GtkButton();
  15. $button->$label1;
  16.  
  17. $button->connect('clicked', 'updatedate');
  18.  
  19. $win->add($button);
  20. $win->connect_simple('destroy', array('Gtk', 'main_quit'));
  21. $win->show_all();
  22.  
  23. gtk::main();
  24.  
  25. ?>

URL: http://rizwan.co.in/blog

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.