tags:

views:

66

answers:

2

I want to create some files in my component and then delete them. How to I got hold of the $tmp_path variable that was set by the user in the configuration.php file?

A: 

I believe you are looking for the sys_get_temp_dir function.

Please be aware that if you are running an older version of PHP (before 5.2.1) there are several comments on that page which explain how to create the function.

evolve
A: 

$config =& JFactory::getConfig();

$tmp_path = $config->getValue('config.tmp_path');

The API documentation for Joomla! is pretty helpful: JFactory::getConfig

Will Mavis