External files premissions, help with understanding them

Permalink
Hello,
I have a problem with including external files to block. I have no access to files in my block folder like xxx.php yyy.php xxx.js From all of them I got "Access denied" error. They work only if I delete "defined('C5_EXECUTE') or die("Access Denied.");" Its normal behavior, it would mean that I have no access to concrete5 api without that line, but I need concrete api!

Even while ago I decieded to add dialog box to my view by standard pattern like:


"<a
dialog-title = "This is the dialog title."
dialog-modal = "false"
dialog-width = "550"
dialog-height = "380"
id = "myDialog"
href = "packages/ytlinks/blocks/ytlinks_block/addlink.php">Addlink</a>
"

My addlink.php

"
<?php
defined('C5_EXECUTE') or die("Access Denied.");
$u = new User();
$u->getUserID();
echo $u;
"

And error shown "Access denied"
It makes me crazy.