const tempalte = `
<span class="c56 c77 c98">текст</span>
<span class="c101">текст</span>
<span class="c111">текст</span>
<span class="c12 c30 c98">текст</span>
`;
const parser = new DOMParser();
const root = parser.parseFromString(tempalte, 'text/html');
root.querySelectorAll('.c77, .c98, .c101').forEach((element) => {
const content = document.createElement('b');
content.append(...element.childNodes);
element.replaceWith(content);
});
console.log(root.body.innerHTML);
/*
<b>текст</b>
<b>текст</b>
<span class="c111">текст</span>
<b>текст</b>
*/
const template = `
<span class="c56 c77 c98">текст</span>
<span class="c101">текст</span>
<span class="c111">текст</span>
<span class="c12 c30 c98">текст</span>
`.trim();
const classNames = ['c77', 'c98', 'c101'];
let result = template;
for (const className of classNames) {
const expression = new RegExp(`<([\\w-]+)\\s*class=".*${className}.*"\\s*>(.+)</\\1>`, 'gm');
result = result.replace(expression, (match, tag, content) => `<b>${content}</b>`);
}
const classNames = ['c77', 'c98', 'c101'];
const expression = new RegExp(`<([\\w-]+)\\s*class=".*(${classNames.join('|')}).*"\\s*>(.+)</\\1>`, 'gm');
const result = template.replace(expression, (match, tag, className, content) => `<b>${content}</b>`);
INSERT INTO `db_extra`(`actor_id`, `name`, `rusname`, `mod_f1`, `mod_f2`,`videos`)
VALUES (:model_id, :model_name, :model_rusname, :model_mod_f1, :model_mod_f2, :model_videos)
ON DUPLICATE KEY UPDATE
`name` = VALUES(`name`), `rusname` = VALUES(`rusname`), `mod_f1` = VALUES(`mod_f1`), `mod_f2` = VALUES(`mod_f2`), `videos` = VALUES(`videos`)
<link href="styles.css?random_string">
<link href="styles.css?<?=time()?>">
<link href="styles.css?<?=md5_file(путь_к_файлу/styles.css)?>">
<link href="styles.css?<?=filemtime(путь_к_файлу/styles.css)?>">
memory_limit = 32M
upload_max_filesize = 32M
post_max_size = 32M
client_max_body_size 32M;
/sbin/nginx -s reload
sudo systemctl reload nginx.service
Сейчас же в конфиге php стоит 8мб, ровно столько же отображается если сделать phpinfo();