Attack
Forum Üyesi
- Katılım
- 4 Şub 2023
- Mesajlar
- 2,618
- Puanları
- 0
I've been using this code for a long time now and it works great:
Code:
$fileDir = '/path/to/public_html';require($fileDir.'/src/XF.php' );\XF::start($fileDir);$app = \XF::setupApp('XF\Pub\App');$app->start();$visitor = \XF::visitor();$user_id = $visitor['user_id'];
When I have my own custom page I use this code to fetch the $user_id but is there a way to check if the page itself is a node or a page? Because if it's a node then it fails because of this code:
Code:
$fileDir =...
Code:
$fileDir = '/path/to/public_html';require($fileDir.'/src/XF.php' );\XF::start($fileDir);$app = \XF::setupApp('XF\Pub\App');$app->start();$visitor = \XF::visitor();$user_id = $visitor['user_id'];
When I have my own custom page I use this code to fetch the $user_id but is there a way to check if the page itself is a node or a page? Because if it's a node then it fails because of this code:
Code:
$fileDir =...
Misafirler için gizlenen link, görmek için
Giriş yap veya üye ol.