Skip to content

Commit f84751a

Browse files
author
ace-n
committed
Don't hardcode tmp
1 parent fa17dc2 commit f84751a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functions/tips_scopes/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function scopeDemo(ServerRequestInterface $request): string
3636
// must write their values to a file.
3737
// (All writable directories in Cloud Functions are in-memory, so these
3838
// operations are typically fast.)
39-
$cachePath = '/tmp/cached_value.txt';
39+
$cachePath = sys_get_temp_dir() . 'cached_value.txt';
4040

4141
if (file_exists($cachePath)) {
4242
// Read cached value from file

0 commit comments

Comments
 (0)