THIS_SCRIPT
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #1
THIS_SCRIPT
When I write this:

PHP Code:
if(THIS_SCRIPT == 'private.php')
{
die(':-)');
}


A smiley face appears in my screen. But with this:

PHP Code:
if(defined('THIS_SCRIPT') && THIS_SCRIPT == 'private.php')
{
die(':-)');
}


It doesn't... may it be my server configuration or something? I don't get it...


Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
(This post was last modified: 08-01-2012 05:45 PM by Sama34.)
08-01-2012 05:44 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: THIS_SCRIPT
I seriously can't see that happening - there's probably something else.
But if you're still curious, you can try

PHP Code:
1
2
3
4
5
6
die(var_dump(
  defined("THIS_SCRIPT"),
  THIS_SCRIPT,
  THIS_SCRIPT == 'private.php',
  (defined('THIS_SCRIPT') && THIS_SCRIPT == 'private.php')
));


My Blog
08-01-2012 07:27 PM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #3
RE: THIS_SCRIPT
It is working now... I am sure I wrote it right, no sure what happened.

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
08-03-2012 09:28 AM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: