The script was working until I started integrating phpbb request variables.
Basically I have a simple form which takes some files..
Code: Select all
<form action="upload_util.php" method="POST" enctype="multipart/form-data">
<div align="center">
<input type="file" name="files[]" multiple>
<button type="submit" name="submit">Upload</button>
</div>
</form>
Code: Select all
if ($request->is_set_post('submit')) {
// Retrieve uploaded files using the request class
$files = $request->file('files');
// Debug: print the $files array
echo '<pre>';
print_r($files);
echo '</pre>';
Code: Select all
Array
(
[name] => none
[type] => none
[tmp_name] => none
[error] => none
[size] => none
)
Exactly
Before phpbb integration it was working fine and I got the filenames. Now it seems to "forget" what was POSTed..
I've been looking around the Internet all morning and I cannot see what I am doing wrong here ?
I have tried passing a variable and that seems to work fine..
Code: Select all
// Retrieve the submitted variable using the request class
$myVariable = $request->variable('myVariable', '');
Code: Select all
<input type="hidden" name="myVariable" value="example_value">