xref: /PHP-8.3/Zend/tests/gh11138.phpt (revision 8bf2d587)
1--TEST--
2move_uploaded_file() emits open_basedir warning for source file
3--POST_RAW--
4Content-type: multipart/form-data, boundary=AaB03x
5
6--AaB03x
7content-disposition: form-data; name="file"; filename="file.txt"
8Content-Type: text/plain
9
10foo
11--AaB03x--
12--FILE--
13<?php
14
15ini_set('open_basedir', __DIR__);
16
17$destination = __DIR__ . '/gh11138.tmp';
18var_dump(move_uploaded_file($_FILES['file']['tmp_name'], $destination));
19echo file_get_contents($destination), "\n";
20
21?>
22--CLEAN--
23<?php
24@unlink(__DIR__ . '/gh11138.tmp');
25?>
26--EXPECT--
27bool(true)
28foo
29