When a files is upload via a form its location is somewhere that is writable by the webserver but NOT in the current application folder. The reason I like this is:
Is there a way to have access to this location via TCPDF when saving a file?
If you want to use the very same location where uploads end up:
$tmp = ini_get('upload_tmp_dir');
But you should use sys_get_temp_dir()
and just '/tmp'
as fallback anyway.
And you know, just pass that as parameter to your save function $TCPDF->Output("$tmp/file.pdf", "F");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With