• XEN DEVELOPMENT is a developer's resource for new developers wanting to build XenForo 2 add-ons. Experienced developers are also welcome to share their experienes and knowledge. This site is not affiliated with XenForo or a replacement for the official XenForo developer forums.

Beginners A simple "hello" example

LPH

Flight Director
Staff member
Type the following into your IDE or text editor.

PHP:
<?php
/**
 * Created by PhpStorm.
 * User: Your Name
 */

echo 'hello';
Save the file as hello.php
Open a browser to your localhost/hello.php
You should see the word hello.
Congratulations. You've written your first PHP file.

The first line is an opening PHP tag.
Lines 2-5 are a multi-line comment.
The last line prints the contents of the single quotes to the browser.
 
Top