RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule "^(.*)$" $1.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule "^games/(.*)$" /lots.php?game=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule "^user/(.*)$" /user.php?id=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule "^lot/(.*)$" /lot.php?id=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule "^create/(.*)$" /create.php?id=$1 [L]
PHP Warning: session_id(): Session ID cannot be changed after headers have already been sent in C:\xampp\htdocs\server\server.php on line 23
PHP Warning: session_start(): Session cannot be started after headers have already been sent in C:\xampp\htdocs\server\server.php on line 24
if (isset($data->session) && isset($data->type) && ($data->type == 'connect')) {
session_id($data->session);
session_start();
if (isset($_SESSION['email']) && $_SESSION['password']) {
$user = R::findOne('users', "email = ? AND password = ?", [
$_SESSION['email'],
$_SESSION['password'],
]);
$users[$user->username] = $connection;
print_r($users);
}
session_write_close();
}
Научитесъ, гуглить, сударь