PHP code example of hascoding / cms

1. Go to this page and download the library: Download hascoding/cms 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/ */

    

hascoding / cms example snippets




class Hasan extends Has_Controller
{

     public function index() //
     {
         echo "Controller has been created successfully.";
     }
     
     public function demo($par1="",$par2="")  //demo is action , $par1 and $par2 is parameters
     {
          echo $par1;
     }
     
     public function add()
     {
          $data= [
               "data1"  = "this is data1",
               "data2" = "this is data2"
          ]
          $this->view("Hasan/Add",$data); // Hasan/Add is System/View/Hasan/Add.php , $data is the data sent to the view file
     }
    

}



<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> echo $data1;