til

#TIL : realpath function

I learned on 2017-08-06 about mistake, php

If you pass a non-exists path to function realpath, it returns empty string. So please don't do something like :

function storage_path($folder) {
	return realpath(__DIR__.'/storage/'.$folder);
}

if you expect it return full path of new folder !

Enjoyed this?

Leave a kudo — it means a lot.

0