mkdir() says theres no such directory and fails?

It happens because you don’t have images/listing-images/rent path existing in your filesystem.

If you want to create the whole path – just pass the 3rd argument as a true:

mkdir('images/listing-images/rent/'.$insertID, 0777, true);

There is also a chance you’re in a wrong directory currently. If this is the case – you need to change the current dir with chdir() or specify the full path.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)