📜 ⬆️ ⬇️

nullCMS: dokilobaytny engine

image

The minimalist experimenter (Nixmrak) presented a nullCMS written in PHP. The microkernel nullCMS fits into 600+ bytes of code.

Call it a full-fledged, or, especially, friendly, CMS - the language does not turn. The main thing is a working platform. On it you can create a simple website.
')
A multidimensional associative array is used as content elements. The author promises extraordinary functions when connecting iterators.

nullCMS is the first swallow to open the era of pre-kilobyte microkernels

But enough words, here's the kernel code :)

<?php
$p=trim($_GET['p'],'/');
require_once ".htdata";
$q=explode('/',$p);$c=$d;
if($p) foreach($q as $w) $c=$c[$w];
if (is_array($c) or !$p)
{
$tc=@$c['#'];
$tm='';
foreach($c as $l=>$v)
{
if(false===strpos($l,'#')) $tm[]='<a href="/'.trim("$p/$l",'/').'">'.$l.'</a>';
}
}
else $tc=$c;
if(is_array($c)&&($c['#t']))$tt=$c['#t'];elseif(@$c)$tt=$w;else $tt=$c='404. Not found';
include ".httpl";

Link to the official website: gpl.pp.ua/projects/nullCMS

Source: https://habr.com/ru/post/77270/


All Articles