Hello.
I try use PHP File Uploader
I write:
require_once BASE_PATH . "/library/phpuploader/include_phpuploader.php";
$uploader=new PhpUploader();
$uploader->Name="pdf_upload";
$uploader->MultipleFilesUpload=true;
$uploader->UploadUrl='/testupload.php';
$uploader->Render();
And in testupload.php code from FAQ:
require_once "library/phpuploader/include_phpuploader.php";
$uploader=new PhpUploader();
$fp = fopen('upl_log.txt', 'w');
$test = fwrite($fp, 'Go script');
$mvcfile=$uploader->GetValidatingFile();
if($mvcfile->FileName=="accord.bmp")
{
$uploader->WriteValidationError("My custom error : Invalid file name. ");
exit(200);
}
//USER CODE:
$targetfilepath= "uploads/myprefix_" . $mvcfile->FileName;
if( is_file ($targetfilepath) )
unlink($targetfilepath);
$mvcfile->MoveTo( $targetfilepath );
$uploader->WriteValidationOK();
when I try to load an image get the error message:
Server side exception, failed to upload 228526_10150250594014978_1050049353_n.jpg
Debug Information:
pdf_upload : Session expired! Please refresh the page and try again.
What i do wrong? How can fix this?