@@ 146-150 (lines=5) @@ | ||
143 | // sys_get_temp_dir is only available since PHP 5.2.1 |
|
144 | // http://php.net/manual/en/function.sys-get-temp-dir.php#94119 |
|
145 | if (!function_exists('sys_get_temp_dir')) { |
|
146 | if ($temp = getenv('TMP')) { |
|
147 | if ((!empty($temp)) && (file_exists($temp))) { |
|
148 | return realpath($temp); |
|
149 | } |
|
150 | } |
|
151 | if ($temp = getenv('TEMP')) { |
|
152 | if ((!empty($temp)) && (file_exists($temp))) { |
|
153 | return realpath($temp); |
|
@@ 151-155 (lines=5) @@ | ||
148 | return realpath($temp); |
|
149 | } |
|
150 | } |
|
151 | if ($temp = getenv('TEMP')) { |
|
152 | if ((!empty($temp)) && (file_exists($temp))) { |
|
153 | return realpath($temp); |
|
154 | } |
|
155 | } |
|
156 | if ($temp = getenv('TMPDIR')) { |
|
157 | if ((!empty($temp)) && (file_exists($temp))) { |
|
158 | return realpath($temp); |
|
@@ 156-160 (lines=5) @@ | ||
153 | return realpath($temp); |
|
154 | } |
|
155 | } |
|
156 | if ($temp = getenv('TMPDIR')) { |
|
157 | if ((!empty($temp)) && (file_exists($temp))) { |
|
158 | return realpath($temp); |
|
159 | } |
|
160 | } |
|
161 | ||
162 | // trick for creating a file in system's temporary dir |
|
163 | // without knowing the path of the system's temporary dir |