We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4dbd543 + b6d9dd0 commit fbb614dCopy full SHA for fbb614d
lib/Twitter.php
@@ -10,7 +10,7 @@ public static function profile($username = '')
10
}
11
12
// Store cached profiles in /cache for now.
13
- $cache = "cache/cache-twitter-{$username}";
+ $cache = dirname($_SERVER['SCRIPT_FILENAME']) . "/cache/cache-twitter-{$username}";
14
//echo "cache is" . $cache . "<br>";
15
if (file_exists($cache)) {
16
// echo "file exists<br>";
@@ -28,6 +28,7 @@ public static function profile($username = '')
28
return array('error' => 'Twitter is not responding.');
29
} else {
30
$profile = json_decode($json, TRUE);
31
+
32
file_put_contents($cache, serialize($profile));
33
34
return $profile;
0 commit comments