I have one common page: default.php
<?php
________Some Codes________
?>
And my project has 100+ .php files. (Yes all files have require_once 'default.php'; on the first line of all pages)
Now, I am deciding to display alert in all the files except 2. (say 1.php & 2.php).
Of course, I'll add that alert in my default.php.
So now my default.php will look like:
<?php
________Some Codes_______
echo $comn_alert = "<script>alert('Hi');</script>";
?>
Question:
How can I stop $comn_alert from executing on 1.php & 2.php?
__FILE__give you when you add this in default.php?__FILE__give you", I didn't get this._FILE__: "If used inside an include, the name of the included file is returned.", so I'd guess it wouldn't work