Announcement

Collapse
No announcement yet.

DEFINE check btw. PHP Widget and non-vB PHP file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [vB4] DEFINE check btw. PHP Widget and non-vB PHP file

    I'm trying to create a protected download link in the widget by placing this code:

    PHP Code:
    if  (!defined('TESTCHECK'))
    {
        echo 
    'This file can only be called  via vB CMS, and not directly';
        exit();

    in a non-vB file.

    I tried to place

    PHP Code:
    define("TESTCHECK",  true); 
    in the Widget in various places, but every time I get:

    This file can only be called via vB CMS, and not directly
    How to organize this standard 'No direct script access allowed' check (between vB Widget and a PHP file)? Can that be done?

    Thanks.
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X