<?php
echo "<pre>";
$base = realpath(__DIR__.'/..');
echo "BASE: $base\n";
$checks = [
  'template_roleta' => is_file($base.'/public/template_roleta.html'),
  'roletas_dir'     => is_dir($base.'/public/roletas'),
  'uploads_dir'     => is_dir($base.'/uploads'),
  'logs_dir'        => is_dir($base.'/logs'),
];
print_r($checks);
$wtest = @file_put_contents($base.'/public/roletas/_write_test.txt','ok');
echo "write public/roletas: ".($wtest!==false?'OK':'FAIL')."\n";
if ($wtest!==false) unlink($base.'/public/roletas/_write_test.txt');
echo "</pre>";
