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 11<?php
22
3- error_reporting (E_ALL );
4- ini_set ('display_errors ' , 0 );
3+ error_reporting (- 1 );
4+ ini_set ('display_errors ' , 1 );
55
66$ uri = $ _SERVER ['REQUEST_URI ' ];
77//echo "uri is: ".$uri."<br>";
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ public static function profile($username = '')
1010 }
1111
1212 // Store cached profiles in /cache for now.
13- $ cache = " cache/cache-twitter- {$ username }" ;
13+ $ cache = dirname ( $ _SERVER [ ' SCRIPT_FILENAME ' ]) . " / cache/cache-twitter- {$ username }" ;
1414 //echo "cache is" . $cache . "<br>";
1515 if (file_exists ($ cache )) {
1616 // echo "file exists<br>";
@@ -28,6 +28,7 @@ public static function profile($username = '')
2828 return array ('error ' => 'Twitter is not responding. ' );
2929 } else {
3030 $ profile = json_decode ($ json , TRUE );
31+
3132 file_put_contents ($ cache , serialize ($ profile ));
3233
3334 return $ profile ;
You can’t perform that action at this time.
0 commit comments