On line guide/help

You are on page 31 of the online help. Navigate sequentially through the guide pages or search for a topic of interest to you.

Index Prev. Next

Basic test report

Build a basic report with a single php file

Useful for testing the operation of the main components of the PDFReport library, let's create a single PHP page that generates a report with a simple welcome text message.


Creating a new PHP test page

Step-by-step guide. Create a folder for your project at the root of your website.

Open a command prompt and inside the project folder, type the following command to install the library:

composer require alienproject/pdfreport

Inside the project folder, create an "index.php" file and copy the following code into it.

"index.php" - Hello test page

Still inside the project folder, create the "hello.xml" file and copy the following XML template into it.

"hello.xml" - XML template file

Run your test project

Now start your local PHP server and development database server (e.g. XAMPP or Laragon). Launch your browser (e.g., Chrome) and type the address of the home page of your newly created web app. It should look something like: http://localhost/my-report-app/index.php. If all goes well, a PDF report appear on the screen.