Jump to content

Mybb Extra Php Sayfalarda Hata


Recommended Posts

Mybb dizininde olmayan farklı bir dizinde izin vermediğim grubun oluşturduğum sayfayı görmesini engellemek istiyorum bunun için oluşturduğum index.php sayfasında,sayfanın en başına şu kodları ekliyorum ama hata alıyorum.

 

aldığım hatalar:

Warning: require_once

Fatal error: require_once()

 

benim anladığım kadarı ile global.php dosyasını bulamıyor ama global.php belirtilen yerde var $dizin = '.';  şeklinde yaptığımda aynı hatayı alıyorum.

 

[attachment=1215:global.php]

<?php
$dizin = dirname(__FILE__);
if(!$dizin){
$dizin = '..';
}
require_once $dizin.'/global.php';
if(!in_array($mybb->user["usergroup"], array(4,6,8,11))){
echo "içeriği görüntüleme yetkiniz yok.";
die();
}
//görüntülenmesini istemediğim içerik buraya
?> 
Edited by MeHMeTBeN
Link to comment
Share on other sites

  • Editor

Dosya yolu ile alakalı olablir bu hata require_once fonksiyonu donsyanın yolunu bulamıyordur muhtemelen 

echo $dizin."/global.php";

bununla yola bak bakalım dosya yolu doğrumu.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...