PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE TABLE `categories` ( `id` int(12) NOT NULL AUTO_INCREMENT, `name` varchar(150) NOT NULL, `description` text NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; INSERT INTO `categories` (`id`, `name`, `description`) VALUES (9, 'php', 'Язык программирования'); CREATE TABLE `posts` ( `id` int(12) NOT NULL AUTO_INCREMENT, `id_user` int(12) NOT NULL, `title` varchar(255) NOT NULL, `content` text NOT NULL, `img` varchar(255) NOT NULL, `id_category` varchar(255) NOT NULL, `status` char(50) NOT NULL, `createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; INSERT INTO `posts` (`id`, `id_user`, `title`, `content`, `img`, `id_category`, `status`, `createdAt`) VALUES (1, 51, 'Новый пост', 'post', '', '9', 'P', '2022-07-09 04:18:31'); CREATE TABLE `users` ( `id` int(12) NOT NULL AUTO_INCREMENT, `admin` tinyint(1) DEFAULT NULL, `username` varchar(40) NOT NULL, `email` varchar(40) NOT NULL, `password` varchar(40) NOT NULL, `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `name` char(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `email` (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; INSERT INTO `users` (`id`, `admin`, `username`, `email`, `password`, `createdAt`, `name`) VALUES (51, 1, 'Rasul', 'mr.sylaev@mail.ru', '444', '2022-07-05 21:24:09', 'RAS');
Copy Clear
Copy Format Clear
<?php if (file_exists($url_send)) { $html = file_get_contents($url_send); if ( preg_match_all( '/<img.*?src=["\'](.*?)["\'].*?>/i', $html, $images, PREG_SET_ORDER ) ) { $url_send = parse_url($url_send); $path = rtrim($path, "/"); foreach ($images as $image) { } } }
Show:  
Copy Clear