Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

By osman103
I’ve just made the switch from GoDaddy’s Shared Hosting to DigitalOcean and their write to disk through PHP appears to be much faster, is there any way of speeding this up?
Code:
fwrite($retrieve, $replace);
fclose($retrieve);
header('Location: ./');
The code above will write a certain piece of data to a specified location before refreshing the page. The problem is, when the page is refreshed, the data hasn’t been finished writing to so the user will see the old data on the page. He will have to refresh the page again to see the updates.
With GoDaddy’s Shared Hosting (using the same piece of code above), the user would be redirected through header after the new data has been written to the file so the user will see the updated contents immediately, rather than having to refresh the page again.
Is there something I’m doing wrong? Is there a way to speed up the write to file time?
I am currently on DigitalOcean’s $5/month plan and I would really appreciate any help on this, thanks!
Erina Jones
05c643336f3a4578a0b414e11ed8fc
792d8c6065294b4da466a26b2a99e4
Joseph Roberts
KFSys
abdullah527382
Karan M Janthe
Brendo Ross
wendoj
d40d179698b0e4b36f241171147902
ff6af0b019c84c9788ebcc3077