View Full Version : include problem

08-31-2006, 05:37 AM
I have a small problem.

I have a script for banning unwanted members, but the problem is:

I want it to take it from \RSDWeb\banned.php always, but it tells me an error because i need to state its exact location like: c:/etc/etc/etc/xampp/etc/banned.php.

and if i do this, if i upload it, my script won't wont work since it has no C.

how can i make it take from: root of the server\RSDWeb\Banned.php

Thanks, please help me ASAP! I need this very much.

08-31-2006, 02:48 PM
u can do it by simple script just by setting flag for banned users in DB

08-31-2006, 03:40 PM
if you are using a linux hosting accout the server root is usually :

so the full path will be

Assuming the the folder RSDWeb is on the 2nd tier of your website

ie www.yourdomain.com/RDSWeb/

hope that helps

08-31-2006, 06:31 PM
I mean I am using http://localhost/RSDWeb/Banned.php

but i want it to still include from root/RSDWeb/Banned.php

and I am using XAMPP on Windows XP

my include looks like:

<? include("/RSDWeb/Banned.php") ?>
and it gives an error that the path doesnt exist...

08-31-2006, 06:34 PM
<?php include("RSDWeb/banned.php") ?>

08-31-2006, 07:06 PM
<?php include($_SERVER['DOCUMENT_ROOT']."RSDWeb/banned.php") ;?>

08-31-2006, 07:35 PM
thanks, the problem with the script you gave it was /RSDWeb/ not rsdweb/

thanks a lot!

08-31-2006, 07:37 PM

it's missing a /

08-31-2006, 10:06 PM
i know , that was the error, it works as good as it should.

thanks everybody.