Файловый менеджер - Редактировать - /home/tuudkjt/globeasy/wp-content/plugins/reviewx/vendor/wpdrill/core/src/DB/Migration/Sql.php
Назад
<?php namespace Rvx\WPDrill\DB\Migration; class Sql { protected string $sql = ''; public function __construct(string $sql) { $this->sql = $this->validate($sql); } public function __toString() : string { return $this->sql; } protected function validate($query) : string { // Remove comments $query = \preg_replace('/(--.*)|(#.*)/', '', $query); // Check if the query contains certain keywords $keywords = array('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'CREATE', 'ALTER', 'DROP', 'TRUNCATE', 'GRANT', 'REVOKE', 'COMMIT', 'ROLLBACK'); $result = \false; foreach ($keywords as $keyword) { if (\stripos($query, $keyword) !== \false) { $result = $result | \true; } } if (!$result) { throw new \Exception('Invalid SQL query'); } return $query; // Query is considered valid } public function concat(self $sql) : self { $this->sql .= $sql->__toString(); return $this; } }
| ver. 1.6 |
Github
|
.
| PHP 8.1.34 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка