我有一个必须将文件上传到服务器的简单组件,但是在提交表单时我看到了这个错误:
Notice: Undefined index: uploaded_file in D:\wamp\www\joomla2.5\components\com_print\print.php on line 13
组件在前端,我的代码是:
<?php
// no direct access
defined('_JEXEC') or die;
jimport('joomla.application.component.controller');
?>
<form enctype="multipart/form-data" action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000" />
Choose a file to upload: <input name="uploaded_file" type="file" />
<input type="submit" value="Upload" />
</form>
<?php
echo $_POST['uploaded_file'];
echo $_POST['MAX_FILE_SIZE'];
?>
请帮忙。