SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2010
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    _SERVER["DOCUMENT_ROOT"] problem with windows servers

    I am running my website on windows server and I am faicing
    SERVER["DOCUMENT_ROOT"] problem with my website...

    I've tried it converting it using...

    PHP Code:
    if(!isset($_SERVER['DOCUMENT_ROOT']))
        { if(isset(
    $_SERVER['SCRIPT_FILENAME']))
            {
    $_SERVER['DOCUMENT_ROOT'] = str_replace'\\''/'substr($_SERVER['SCRIPT_FILENAME'], 00-strlen($_SERVER['PHP_SELF'])));
            };
        };
        if(!isset(
    $_SERVER['DOCUMENT_ROOT']))
        { if(isset(
    $_SERVER['PATH_TRANSLATED']))
            {
    $_SERVER['DOCUMENT_ROOT'] = str_replace'\\''/'substr(str_replace('\\\\''\\'$_SERVER['PATH_TRANSLATED']), 00-strlen($_SERVER['PHP_SELF']))
                );
        };
    }; 
    in my php info file its showing:
    _SERVER["DOCUMENT_ROOT"] C:\HostingSpaces\rksmatri\aimanews.com\wwwroot


    when I run the script in browser it flagging with the error:

    Firefox doesn't know how to open this address, because the protocol (c) isn't associated with any program

    Please let me know how can I fix this..

    Thanks

  2. #2
    SitePoint Addict
    Join Date
    Apr 2009
    Posts
    356
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Most forums don't like it much when your crosspost.
    Doug G
    =====
    "If you ain't the lead dog, the view is always the same - Anon

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2010
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes Doug G,

    Sorry for that as I normally post it once...but after posting in php section I realized that I post it on wrong category....that's why I posted it here.. so that I would be able to have a better solution...

    And I am not permitted to move my thread...

    Sorry for the inconvenience...bt I can't delete my post tooo....

  4. #4
    SitePoint Addict
    Join Date
    Apr 2009
    Posts
    356
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I was only mentioning ..
    Doug G
    =====
    "If you ain't the lead dog, the view is always the same - Anon


Bookmarks

Posting Permissions

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