PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$bt = debug_backtrace(); //get the backtrace array
$previouspage = $bt[0]['file']; //outputs the file the current function is in. The current function is require, and that function is in the caller file