I doubt use basename

0

I am analyzing a code that works correctly but I have a question Why is this line using $_FILES["fileToUpload"]["name"] and then the basename function is given? As I understand the first one ($ _FILES ...) it returns the filename with the extension without the path. On the other hand, basename does the same thing. Why are both of them used together doing the same thing?

$target_file = $carpeta . basename($_FILES["fileToUpload"]["name"]);
    
asked by RicardoKra 07.11.2018 в 15:35
source

0 answers