PHP code example of grithin / file-include
1. Go to this page and download the library: Download grithin/file-include 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/ */
grithin / file-include example snippets
use \Grithin\FileInclude;
# inject `bob` into the file context, so file code can access $bob
FileInclude::include('file.php', ['bob'=>$bob]);
# inject the global $bob into the file
global $bob;
FileInclude::
$bob = 'bob';
return 123;
$result = FileInclude::
'bob'=>'bob'
]
*/