Is it possible to write data to CSV
while the file is opened from desktop? Because I am trying to write some input data to CSV
when user submit the form, but I am getting above error when the file is opened from my desktop. My system will only write to csv when I close the file.
Error when meeting the line $fp = fopen("C:\Users\lenovo\Desktop\sample.csv", "w");
Change the permission of the file sample.csv by using the following command on the terminal in the folder where the file is-
chmod 777 sample.csv