tmp folder on deployed server

I need to fill into an empty excel sheet (xls) some data from the database. For this purpose I use PHPExcel that is already included in scriptcase.

$inputFileName = “…/…/…/tmp/”.$fileName;
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel = $objReader->load($inputFileName);
$sheet=$objPHPExcel->getSheet(0);

//fill data into specific cells
$objPHPExcel->getActiveSheet()->setCellValue(‘D13’,‘sample_text’);

Question: Do I access the tmp Folder in deployment the same way?

check the path of your tmp folder on your deployment server

you can do this :
$dirpath = $_SERVER[‘DOCUMENT_ROOT’]."/tmp/";

Thank you nonkelmike for the suggestion.

What I am really looking for is a system variable, that I can use in my scripts and it will be changed by scriptcase depending of where the app is running. At present on a deployed system tmp sits as ‘…/_lib/tmp/’ and on development is is ‘…/…/…/tmp/’.