Home arrow PHP arrow Page 3 - Programming with PHP and GTK, Part 1

A Test Run - PHP

Have you ever thought of writing a PHP application for client side execution without having a web server present? Learn the basics of creating a front end for PHP using PHP-GTK.

TABLE OF CONTENTS:
  1. Programming with PHP and GTK, Part 1
  2. Installing PHP-GTK
  3. A Test Run
  4. A PHP-GTK Window
  5. Widgets
  6. A Simple Program
By: Vinu Thomas
Rating: starstarstarstarstar / 40
August 16, 2004

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Let's get to running a program

Before we start learning how to write programs in PHP-GTK, let's run one of the test programs to see if our installation work. Let's run a program called hello.php, which is in the TEST folder. Go to the command prompt and head over to C:PHP4TEST. To run the program, you'll need to type in "php hello.php".

If your PHP-GTK installation is correct, you should see a new window pop up with a button which greeting Hello World!

PHP and GTK+

You can click on the button to close the program. You'll notice that when you click on the button, before the program exits, it sends the output "Hello World" back to the command console. If you use echo and print functions in your program, the output goes to the command console instead of the GTK front-end. This feature can be tapped when you need to debug your programs:

C:>cdphp4test
C:php4test>php hello.php
Hello World !

C:php4test>_

Now you can try running the other programs in the test folder.



 
 
>>> More PHP Articles          >>> More By Vinu Thomas
 

blog comments powered by Disqus
   

PHP ARTICLES

- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...
- PHP: Building Concrete Validators
- Sanitizing Input with PHP
- Executing Shell Commands with PHP
- Handling File Data with PHP
- File Security and Resources with PHP
- ArrayObject PHP Class Examples
- ArrayObject PHP Class: An Introduction
- Getting File System Data with PHP
- PHP Tools for Working with the File and Oper...
- Working with the File and Operating System w...
- PHP Proxy Patterns: Completing a Blog


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 5 - Follow our Sitemap

Dev Shed Tutorial Topics: