Skip to content

mlightvn/simple-coding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Donate

Apache config

<VirtualHost *:80>
    ServerName "simple-coding.raku.nam"
    DocumentRoot "/var/www/vhosts/raku/simple-coding/controller/"
    ErrorLog logs/simple-coding.error.log
    CustomLog logs/simple-coding.access.log combined env=!no_log

    <Directory "/var/www/vhosts/raku/simple-coding/">
	DirectoryIndex index.php index.html
	Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

</VirtualHost>

How to use

Require

include_once("../Raku/config/bootstrap.php");

Declare class:

$raku = new \Raku\SimpleCoding\SimpleCoding();

Common functions

Function Name Parametters Description
view($source_file_path, $data); $source_file_path: php file. Similar to blade file path in Laravel. &br; $data: array of parametters (variables) for source file. Compile source file to compiled file, then display on screen.

Common attributes

Attribute Name Type Description
isClearCache boolean: false True: Clear cached/compiled files every reload. Use for developing. In production, should be false. And clear all cached/compiled files in storage/compiled/ folder.

Sample

Please look in controller/ and view/ folder for sample source code.

Deploy to production

  • Deploy latest source code files.
  • Clear all cache in storage/compiled/ folder

About

Write single PHP page with simple code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published