Can't write image data to path (C:\xampp\ht code example

Example 1: Can't write image data to path (C:\xampp\ht

How to change file permission on  Windows 10.
Right-click on a file or folder.
Select Properties.
Click the Security tab.
Click Edit
Click "Change" next to the owner name ( set full permission to all users ). 
Apply 
OK 
thats it

Example 2: Can't write image data to path

Just change this:

$path = public_path('images/cars/'.$filename);

To this:

$path = 'images/cars/' . $filename;

Also, make sure that, the target path/location is writable, has write 
permission.

Tags:

Php Example