User Tools

Site Tools


hello_world

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
hello_world [2020/11/14 15:06] sahlhello_world [2023/11/18 08:46] (current) sahl
Line 15: Line 15:
  
 Therefore if you need to say Hello World, just ask PHP to say Hello World. I won't get in your way with a complex framework. Therefore if you need to say Hello World, just ask PHP to say Hello World. I won't get in your way with a complex framework.
 +
 +Buuut if you want to utilize the framework, you could also do this:
 +
 +<code php>
 +<?php
 +class HelloWorldComponent extends Component {
 +  function renderContent() {
 +    echo "Hello World";
 +  }
 +}
 +
 +$hello_world_component = new HelloWorldComponent();
 +Page::renderPageStart('Hello World');
 +$hello_world_component->render();
 +Page::renderPageEnd();
 +</code>
 +
 +A little more complex, but still easy to comprehend.
hello_world.txt · Last modified: 2023/11/18 08:46 by sahl

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki