Quantcast
Channel: PHPWord
Viewing all articles
Browse latest Browse all 450

Created Issue: temp file creation [53]

$
0
0
Hello,

I am getting some permission related errors with this library. I noticed the following line in the constructor of PHPWord_Template (line 67 of Template.php in my version):

$this->_tempFileName = $path.DIRECTORY_SEPARATOR.time().'.docx';

I am not sure if this is the best way to create temp files. Not to mention if two php requests are made in less than one seconds the created temp files will colide.

PHP has the native functionality to create temp files:
http://php.net/manual/en/function.tmpfile.php

The created files are unique with "tmpfile" and have write access mode. Shall we use this instead? Would save me some trouble running the library on a linux server with a lot of concurrent users.

Appreciate it,

Seyed.

Viewing all articles
Browse latest Browse all 450

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>