mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
For those who have not set TMPNAME in php.ini (Thanks, again, to Lars)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@32084 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
ce6a94a250
commit
be1a028b7f
1 changed files with 4 additions and 0 deletions
|
@ -83,6 +83,10 @@ Send this file: <INPUT NAME="userfile" TYPE="file">
|
|||
// Make sure file is coming from upload directory
|
||||
$uploadpath = get_cfg_var('upload_tmp_dir') . '/' . basename($userfile);
|
||||
|
||||
// If you have not set your TMPDIR in pnp.ini, the following line
|
||||
// can be uncommented, and used instead of the above line
|
||||
// $uploadpath = dirname(tempnam('', '')) . '/' . basename($userfile);
|
||||
|
||||
if (file_exists($uploadpath)){
|
||||
copy ("$uploadpath", "/place/to/put/uploaded/file");
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue