June 27, 2011
base direcory of script
Question by rohit
i am making twitter application when i call callback.php it shows some error
here is some part of my callback.php where i think it has some problem
////// First establish base directory for app
define('QA_BASE_DIR', dirname(empty($_SERVER['SCRIPT_FILENAME']) ? __FILE__ : $_SERVER['SCRIPT_FILENAME']).'/../../');
$qainc=$_SERVER['DOCUMENT_ROOT'] . '/qa-include'; //second
$piinc=$_SERVER['DOCUMENT_ROOT'] . '/qa-plugin';
/* Start session and load lib */
session_start();
require_once $piinc. '/twitter-oauth-login/twitteroauth/twitteroauth.php';
require_once $piinc. '/twitter-oauth-login/config.php';
i want my directory url so i write second line
www.domain.com/qa-plugin —– i want this url but this command return this address
“/usr/local/apache/htdocs/qa-include”
how to correct error please help me out….