0

If I put the following code in a .php file and run it in my browser, two directories are created in my /tmp directory, each with a uniqid() based name:

<?php

$tmpfolder = uniqid("test_");
echo $tmpfolder;
mkdir("/tmp/" . $tmpfolder);
exit();

It's exactly as if I had run the code twice. One name is displayed from the echo, but another one is created as well.

Has anyone seen this strange behavior before? I have no idea on how to solve it, and thought someone here would.

Markus Amalthea Magnuson
  • 8,415
  • 4
  • 41
  • 49

0 Answers0