I am using the Tcpdf module and PHP to create dymanic PDF invoices from an ordering system.
The script should then save the invoice into a folder called \"invoices\"
I found the issue was that the path for fopen has to be from the document root, and not from the PHP script location.
C:\Website\www\script\invoice\invoice.pdf
For example if the PHP script is inside the "script" folder, and you want to create the pdf inside the "invoice" folder, the script needs to have "\script\invoice\invoice.pdf".