How to know website path ?

Discussion in 'Web Hosting' started by nickgo2, Feb 1, 2010.

  1. #1
    When i use qooy.com scripts ,it need to set path .

    How do I know the path of site_path , upload_path, php_path and config_ini
    <?php

    $site_path = "//"; // Path

    $site_upload_path = "//"; //Path to the uploads directory

    $php_path = "/usr/local/bin/php"; // PHP Path

    $config_ini = "/usr/local/lib/php.ini"; // Php.ini Path

    How do I know the path of site_path , upload_path, php_path and config_ini
     
    nickgo2, Feb 1, 2010 IP
  2. WebIntellects - Rob

    WebIntellects - Rob Active Member

    Messages:
    689
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #2
    I would recommend you ask that in the programming forums. I think that will be answered better there.
     
    WebIntellects - Rob, Feb 2, 2010 IP
  3. nickgo2

    nickgo2 Member

    Messages:
    582
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #3
    Ok ~~ thanks !
     
    nickgo2, Feb 2, 2010 IP
  4. WebIntellects - Rob

    WebIntellects - Rob Active Member

    Messages:
    689
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #4
    Not a problem. Good luck
     
    WebIntellects - Rob, Feb 2, 2010 IP
  5. rmxhost

    rmxhost Greenhorn

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #5
    By $site_path I assume you want to know in which directory your website is located. This can be done by the following PHP code:

    <?
    $site_path = system("pwd");
    echo $site_path;
    ?>

    To get $php_path:

    <?
    $php_path = system("which php");
    echo $php_path;
    ?>

    This will not work if exec() function in PHP is disabled.
    Can't help you with the others, though.
     
    rmxhost, Feb 3, 2010 IP