Answer the question
In order to leave comments, you need to log in
Why give a uniqid() to a file if you don't refer to it later?
do$uniqid_path = _PS_UPLOAD_DIR_ . uniqid();while (file_exists($uniqid_path));
file_put_contents($uniqid_path, $field);
$tab = '';
Answer the question
In order to leave comments, you need to log in
through sha1, files with the same name can be obtained. The goal is most likely that the file names do not match, and since uniqid() is not remembered anywhere, it can be assumed that the file name does not play a role here, but they are processed by some kind of cycle from the _PS_UPLOAD_DIR_ folder
or $uniq_path below is stored in the database, and so each file remembers the original path, in any case, they did "for now, what would work, and then I'll finish it"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question