File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- error_reporting (E_ALL );
4
- ini_set ('display_errors ' , 0 );
3
+ error_reporting (- 1 );
4
+ ini_set ('display_errors ' , 1 );
5
5
6
6
$ uri = $ _SERVER ['REQUEST_URI ' ];
7
7
//echo "uri is: ".$uri."<br>";
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ public static function profile($username = '')
10
10
}
11
11
12
12
// Store cached profiles in /cache for now.
13
- $ cache = " cache/cache-twitter- {$ username }" ;
13
+ $ cache = dirname ( $ _SERVER [ ' SCRIPT_FILENAME ' ]) . " / cache/cache-twitter- {$ username }" ;
14
14
//echo "cache is" . $cache . "<br>";
15
15
if (file_exists ($ cache )) {
16
16
// echo "file exists<br>";
@@ -28,6 +28,7 @@ public static function profile($username = '')
28
28
return array ('error ' => 'Twitter is not responding. ' );
29
29
} else {
30
30
$ profile = json_decode ($ json , TRUE );
31
+
31
32
file_put_contents ($ cache , serialize ($ profile ));
32
33
33
34
return $ profile ;
You can’t perform that action at this time.
0 commit comments