Studiati questo codice:
Codice PHP:<?php
$pattern = '#"<#si';
$content = 'Hello World!';
if (preg_match($pattern, $content)) {
echo("errore 1");
}
$content = 'Hello " World!';
if (preg_match($pattern, $content)) {
echo("errore 2");
}
$content = 'Hello < World!';
if (preg_match($pattern, $content)) {
echo("errore 3");
}
$content = 'Hello <" World!';
if (preg_match($pattern, $content)) {
echo("errore 4");
}
$content = 'Hello "< World!';
if (preg_match($pattern, $content)) {
echo("errore 5");
}
?>

Rispondi quotando