Print This Page


3. Hello World


Welcome to the qE. In this chapter, you will learn how to use qE to create a simple script! If you haven't, please install qE in your host.

Hello World?!

  1. With a text editor, create a blank file in qE root folder, eg: test.php, place it in the same folder as index.php.
  2. Then add some PHP lines:
    // always use user_init.php for UI

    require './includes/user_init.php';

    // as qE is template based, all output must be contained in $txt['main_body']

    $txt['main_body'] = 'Hello World';

    // send the content of $txt[main_body] to output
    // always remember, flush_tpl() also exit the script, so always put flush_tpl
    // at the end of the script!

    flush_tpl ();
  3. Try it. It should print "Hello World" using your default skin. Easy eh?
    ps. of course, you can change the skin of your qE, follow the information about it in User's Guide.

There are so many functions available in qE, you can learn about them in Function Reference.

There is no comment. Why not be the first?

More Comments/Post Your Own

Powered by qEngine
Generated in 0.010 second | 15 queries