Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9

Thread: include problem

  1. #1
    Regular Coder DELOCH's Avatar
    Join Date
    Apr 2006
    Location
    Canada
    Posts
    537
    Thanks
    4
    Thanked 2 Times in 2 Posts

    include problem

    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.

  • #2
    Regular Coder
    Join Date
    Mar 2005
    Location
    Pakistan
    Posts
    207
    Thanks
    0
    Thanked 0 Times in 0 Posts
    u can do it by simple script just by setting flag for banned users in DB
    God helps those who help others.

  • #3
    New Coder
    Join Date
    Aug 2006
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts
    if you are using a linux hosting accout the server root is usually :

    /home/YOURUSERNAME/public_html/
    so the full path will be
    /home/YOURUSERNAME/public_html/RSDWeb/banned.php

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

    ie www.yourdomain.com/RDSWeb/

    hope that helps

  • #4
    Regular Coder DELOCH's Avatar
    Join Date
    Apr 2006
    Location
    Canada
    Posts
    537
    Thanks
    4
    Thanked 2 Times in 2 Posts
    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...

  • #5
    Regular Coder googleit's Avatar
    Join Date
    Jul 2006
    Location
    birmingham, uk
    Posts
    189
    Thanks
    0
    Thanked 0 Times in 0 Posts
    try
    PHP Code:
    <?php include("RSDWeb/banned.php"?>

  • #6
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts
    <?php include($_SERVER['DOCUMENT_ROOT']."RSDWeb/banned.php") ;?>

  • #7
    Regular Coder DELOCH's Avatar
    Join Date
    Apr 2006
    Location
    Canada
    Posts
    537
    Thanks
    4
    Thanked 2 Times in 2 Posts
    thanks, the problem with the script you gave it was /RSDWeb/ not rsdweb/

    thanks a lot!
    Last edited by DELOCH; 08-31-2006 at 06:37 PM.

  • #8
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    htdocsRSDWeb

    it's missing a /

  • #9
    Regular Coder DELOCH's Avatar
    Join Date
    Apr 2006
    Location
    Canada
    Posts
    537
    Thanks
    4
    Thanked 2 Times in 2 Posts
    i know , that was the error, it works as good as it should.

    thanks everybody.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •