basics please help.. DOC_ROOT

Discussion in 'PHP' started by rajeevthomas, Mar 19, 2010.

  1. #1
    Hi everyone, I am making an attempt to use a PHP gallery. In the install-help file to I am asked to make changes in the config file. I have a WAMP server (localhost) and server folder www. In which I have 'gallery' folder then an 'images' folder and in that a folder called gog. I am stuck at these two...

    define('DOC_ROOT', $_SERVER['DOCUMENT_ROOT']);

    define('GALLERY_ROOT', '/images/pig');

    How do I change the above statements to indicate my folders? I know this is a very basic question to most of you. Please help... thank you.
     
    rajeevthomas, Mar 19, 2010 IP
  2. koko5

    koko5 Active Member

    Messages:
    394
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    70
    #2
    Hi,

    try:
    define('DOC_ROOT', $_SERVER['DOCUMENT_ROOT']);
    define('GALLERY_ROOT', DOC_ROOT.'/images/pics');
    
    PHP:
    Regards :)
     
    koko5, Mar 19, 2010 IP
  3. ceo.ahlul

    ceo.ahlul Peon

    Messages:
    57
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    First you have to find he path of folder for main PHP gallery, example:
    C:\WAMP\www\phpgallery

    So you can use:

    define('DOC_ROOT', $_SERVER['DOCUMENT_ROOT']."/phpgallery");
    define('GALLERY_ROOT', '/images/pig');

    But if you store directly all the file under www, you not need to change the configuration.
     
    ceo.ahlul, Mar 19, 2010 IP
  4. rajeevthomas

    rajeevthomas Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thank you guys...I am very confused... because it is not working... if I had placed all the files under www ...should I indicate that? How do i do that?
     
    rajeevthomas, Mar 21, 2010 IP