print

3. Hello World — Again?!

You are here: C97net3. Developer's Guide

Learn the first step of qE development

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:
    <?php
    // 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?

read more More Comments/Post Your Own

Account

Search

Tags

acp add all also any create default display don download easy echo etc features field file files folder form function includes information init kemana link list may module name need number own page php please qengine read require script set site skin time tpl url use user using version welcome