apache - Temp dir in php.ini not working? -


i have following script:

<form method=post enctype="multipart/form-data"> <input type=file name=test><input type=submit></form> <?php echo sys_get_temp_dir(); echo '<br/>'; echo ini_get('upload_tmp_dir'); echo '<br/><pre>'; print_r($_files); echo '</pre>'; 

this output:

/var/tmp/ /opt/httpd/tmp array (      [test] => array      (         [name] => the-doors-logo.jpg         [type] => image/jpeg         [tmp_name] => /tmp/phpyee7cx         [error] => 0         [size] => 80635     ) ) 

in php.ini tmp_upload_dir set '/opt/httpd/tmp'.

can explain me how php can give me 2 different 'tmp' folders, while tmp_name in files still in /tmp?

it's because upload_temp_dir have been specified in php.ini, php use this, unless not specified, not exist or unwritable, php use default system temp dir.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -