I am having trouble uploading file on server.

My code:

```
$path = "produkty/$kategorie/$last_id/";
if(!is_dir($path)){
  mkdir($path, 0777, true);
}
if (is_dir($path) && is_writable($path)) { echo "ok"; }

```

And it returned ok.

The upload code looks like this:

```
move_uploaded_file($_FILES["uvodniobr"]["tmp_name"], $path."uvodniobr.".$ext)

```

If I echo out:

```
echo $path."uvodniobr.".$ext;

```

It will return this: **produkty/kategorie/35/uvodniobr.png**

Things like checking file size, extension works fine, it just won't upload.
Do you know what could be wrong with my code? Thank you

SOLVED
EDIT: I was trying to upload file over 2MB without changing php.ini in xampp/php/php.ini upload\_max\_filesize=2M.
Thank you for your answers.