ignore_user_abort(true);
set_time_limit(0);
header("Location: /false.php", true);
header("Connection: close", true);
header("Content-Encoding: none\r\n");
header("Content-Length: 0", true);
flush();
ob_flush();
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from random import *
import sys,os,threading
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtWebKit import *
from PyQt5.QtWebKitWidgets import *
from PyQt5.QtWidgets import QApplication, QWidget, QMainWindow
port = str(randint(9000, 9999))
url = "http://localhost:"+port
comm = "php -S localhost:"+port+" -t app/"
icon = "app/icon.ico"
title = "Qt Web App"
dw = 1920
dh = 1080
ww = 800
wh = 600
def closer():
app.exec_()
os.system("ps -ef | grep \""+comm+"\" > .pid ")
proc = open(".pid")
proc = proc.readlines()
for line in proc:
line = line.split()
pid = line[1]
os.system("kill "+pid)
os.remove('.pid')
def run_server():
os.system(comm)
server = threading.Thread(target=run_server)
server.start()
app = QApplication(sys.argv)
web = QWebView()
web.load(QUrl(url))
web.setGeometry(int((dw-ww)/2), int((dh-wh)/2), ww, wh)
web.setWindowTitle(title)
web.setWindowIcon(QIcon(icon))
web.show()
sys.exit(closer())
<!DOCTYPE html><html><head>
<meta charset="utf-8">
<title>TITLE</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
border: none;
}
</style>
</head><body>
<iframe src="<?php print($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].':8080'.$_SERVER['REQUEST_URI']) ?>"></iframe>
</body></html>
if (pathinfo($file_path)['filename'] == 'index') {
// Если имя файла в пути index, то берем имя родительского каталога
$title = explode('/', $file_path);
$title = $title[count($title)-2];
$title = ($title == 'pages'? 'Главная' : $title);
} else {
// Если имя файла не index, то берем название файла, отрезав .html (последние 5 символов)
$title = substr(array_pop(explode('/', $file_path)), 0, -5);
}
callback_data - строка 1-64 символа будет передан боту через объект CallbackQuery
RewriteEngine On
RewriteBase /
FallbackResource index.php
RewriteRule ^pages/(.+)$ http://my.site/$1 [R=301,L] /// удалил эту строку, которую добавил раньше и забыл.
RewriteRule ^.*$ index.php [NC,L]
<?php
$requestUrl = $_SERVER["REQUEST_URI"];
include_once "core/route.php";
$fileName = $Valid[$requestUrl];
require ($fileName);
echo $View["description"]; // ВСЕ РАБОТАЕТ!
?>
<?php $Valid = array(
'/admin' => 'core/auth.php',
'/' => 'pages/home.php',
)?>
<?php $View = array(
"title" => "TITLE",
"description" => "DESCRIPTION",
"keywords" => "KEYWORDS",
"content" => "CONTENT",
)?>
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, sys
arg, i = sys.argv, -1
while i != 0:
file = arg[i]
if arg[0] != file:
os.system('pyuic5 -x ' + file + ' -o ' + file[0: -3] + '.py')
i -= 1
else:
break
./build mainQtForm1.ui
#Error in input file: not well-formed (invalid token): line 1, column 1 +1 FILE
./build mainQtForm1.ui mainQtForm2.ui
#Error in input file: not well-formed (invalid token): line 1, column 1 +1 FILE
#Error in input file: not well-formed (invalid token): line 1, column 1 +1 FILE
./build *.ui
#Error in input file: not well-formed (invalid token): line 1, column 1 +1 FILE
#Error in input file: not well-formed (invalid token): line 1, column 1 +1 FILE
#Error in input file: not well-formed (invalid token): line 1, column 1 +1 FILE