Separate php page not working with php 8.1

Prior to updating to php 8.1, I had a functioning tidy, different php web page with only php-code on my wordpress website.
Similar To This:
mydomainname/public _ html/wp-content/showlist/ showlist.php

The code will certainly no more approve origin courses like: PLUGIN-NAME_ROOT_PATH
This code will certainly not function either: $rootPath = dirname( __ DATA __)
The web page implementation quits, codes hereafter will certainly disappoint.
As an instance: