1
Vexed
Why does Xoops not use __FILE__?
  • 2008/3/28 2:28

  • Vexed

  • Just popping in

  • Posts: 4

  • Since: 2008/3/27


In mainfile.php

$xoopsScriptPath = debug_backtrace();
if ( !count($xoopsScriptPath) ) {
die("XOOPS path check: this file cannot be requested directly");
}
$xoopsScriptPath = $xoopsScriptPath[0]['file'];


Why does XOOPS not use __FILE__ directly?

$xoopsScriptPath = __FILE__;

2
phppp
Re: Why does Xoops not use __FILE__?
  • 2008/3/28 6:19

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


_FILE__ refer to CURRENT file, i.e. mainfile.php
$xoopsScriptPath[0]['file'] refer to the file calling mainfile.php

3
Vexed
Re: Why does Xoops not use __FILE__?
  • 2008/3/28 6:27

  • Vexed

  • Just popping in

  • Posts: 4

  • Since: 2008/3/27


Many thanks :) I got it!

Login

Who's Online

435 user(s) are online (304 user(s) are browsing Support Forums)


Members: 0


Guests: 435


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits