In addition to using ILE RPG and RPG Open Access on the server side, Profound UI also allows you to use PHP with Rich Display Files.

To implement an equivalent Hello World application with PHP, follow these steps:

        

<?php

header("Content-Type: application/json");

if (isset($_POST['btnExit']) && $_POST['btnExit'] == '1') {
  return;
}

$view = '/profoundui/userdata/dspf/HelloWorld.json';
$output = array('view' => $view, 'screen' => 'HELLO');
echo json_encode($output);

?>

 

The code explained: