$tmp_file = ilTempnam(); echo $tmp_file;
/tmp/il_tempfile_12345.txt
Output:mydir/prefix_12345.txt ``` In this example, we specify a directory (`mydir`) and a prefix (`prefix_`) for the temporary file. ilTempnam generates a unique number and appends it to the prefix before returning the full path to the file, which we then store in the `$tmp_file` variable. Finally, we print the file name to the screen. Package library: ilUtil is part of the ILIAS e-learning platform.