PHP code example of phore / status-page

1. Go to this page and download the library: Download phore/status-page library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

phore / status-page example snippets



namespace App;
use Phore\StatusPage\PageHandler\NaviButtonWithIcon;
use Phore\StatusPage\StatusPageApp;

"];
}, new NaviButtonWithIcon("Home", "fas fa-home"));

$app->serve();

 
$app = new BasicAuthStatusPageApp();
$app->allowUser("admin", "admin");




$app = new StatusPageApp("SomeName", "/subdir");
$app->addPage("/subdir/", function() {
    return ["h1"=>"SubApp"];
});
$app->serve();


$data = ["a", "b", "c"];

$tblData = phore_array_transform($data, function($key, $value) {
    return [
        date ("Y-m-d"),
        ["a @href=/some/other" => "Hello Column"]
    ];
});

$tbl = pt()->basic_table(
    ["Date",    "Comment"],
    $tblData,
    ["",        "@align=right"]
);


FallbackResource /index.php

FallbackResource /subdir/index.php