/login?zapros=123 -> /login.php?zapros=123
RewriteRule ^login$ login.php [L,QSA]
$json = json_decode("тут жсон", true);
foreach ($json['season_episodes_count'] as $season) {
// $season -> ['season_number' => X, 'episodes_count' => Y]
// делай с этим что хочешь
}
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php?q=$1 [QSA,L]
namespace app\models;
class User extends Model {
public static function foo() { echo "I've called by a controller!"; }
}
use \app\models\User;
class ControllerComments extends Controller {
public function __construct() { User::foo(); }
}
$test = new ControllerComments();
$group = json_decode(file_get_contents("https://api.vk.com/method/wall.get?v=5.29&domain=".$_GET["id"].
"&count=60&filter=owner"), true);
foreach($group['response']['items'] as $user) {
echo "<div class=\"post\"><img class=\"group-photo\" src=\"".$info['response'][0]['photo_50'].
"\"/><p>".nl2br($user['text']).
"</p></div>\n";
}