You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the cache folder is not in the directory, the application crashed.
therefore, i've added this little piece of code to the project where i'm using your great work.
/*
* Check if the cache folder exists in the imdbphp api.
* if it doesn't - then create it!
*/
if (!file_exists('../includes/api/imdbphp/cache'))
{
mkdir('../includes/api/imdbphp/cache', 0777, true);
}
Anyway, Thanks for sharing this!
The text was updated successfully, but these errors were encountered:
Sound good so far – but it shouldn't use a hard-coded path. There's a config variable cachedir which should be used instead. Furthermore, this check is only required when caching is enabled (config: usecache). And even then, it should not be done "too often". A quick idea might be doing so in the constructor; but this I better leave to @tboothman as he's more familiar with the current code 😇
This was just my quickfix. But of course for a sustainable solution, config
file is the way to go. A chef on whether or not the cache is enabled is
likewise the better choice. Well, all your points are valid. Thank you sir.
Sound good so far – but it shouldn't use a hard-coded path. There's a
config variable cachedir which should be used instead. Furthermore, this
check is only required when caching is enabled (config: usecache). And
even then, it should not be done "too often". A quick idea might be doing
so in the constructor; but this I better leave to @tboothman https://github.com/tboothman as he's more familiar with the current
code [image: 😇]
—
Reply to this email directly or view it on GitHub #32 (comment).
If the cache folder is not in the directory, the application crashed.
therefore, i've added this little piece of code to the project where i'm using your great work.
Anyway, Thanks for sharing this!
The text was updated successfully, but these errors were encountered: