PHP code example of bitslip6 / bitfire

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

    

bitslip6 / bitfire example snippets



file_put_contents($_GET['filename'], $_GET['content']);

namespace BitFire\Plugin

function is_admin() : bool {
  if (my_custom_acl_check($_COOKIE)) { 
    return true;
  }
  return false;

  // OR simply: 
  return my_custom_acl_check();
}

$user = get_current_user();
$user->setRole($_GET['user_role']);

QueryBlockList::new("table_name", "insert/update/delete", ["matching", "query", "criteria"], 'privilege_check_function');