I am calling a function which is passed a string like below
$templateProcessor->saveAs('C:\xampp\htdocs\portal\templates\doc1.docx');
Problem is, I need it to be more like
$templateProcessor->saveAs('C:\xampp\htdocs\portal\templates\' . $this->fileName . '.docx');
If I do this however, my string breaks and I think it is due to the backslashes in the string.
How can I resolve this?
p.s. I actually would prefer to do something like this
$templateProcessor->saveAs(dirname(__FILE__) . '../../templates/doc1.docx');
but it didnt seem to like me using ../../ because I need to step out of the current working directory.
Thanks