$loader->registerNamespaces([
'App' => APP_PATH,
]);
<?php
$showForm = false;
// Была отправлена форма
if(count($_POST))
{
// Все поля заполнены
if (!empty($_POST['name']) && !empty($_POST['age']) && !empty($_POST['message']))
{
$name = strip_tags($_POST['name']);
$age = strip_tags($_POST['age']);
$text = strip_tags($_POST['message']);
echo 'Привет, '.$name.'<br>';
echo 'Вам '.$age.' лет <br>';
echo 'Ваше сообщение: '.$text;
}
// Что-то не заполнено
else {
echo "Some fields are still empty. Try entering again";
$showForm = true;
}
} else {
$showForm = true;
}
?>
<? if($showForm): ?>
<form action="" method="POST">
<input type="text" name="name" placeholder="Введите имя..."> <br> <br>
<input type="text" name="age" placeholder="Введите возраст..."> <br> <br>
<textarea name="message" placeholder="Введите текст..."></textarea> <br> <br>
<input type="submit" name="submit">
</form>
<? endif; ?>
http://phptest/index.php?r=post
или http://phptest/post
(если включены prettyUrl в urlManager) Event:DialEnd|Privilege:call,all|Channel:Local/+79828125463@from-internal-00000136;2|ChannelState:4|ChannelStateDesc:Ring|CallerIDNum:79828125463|CallerIDName:<unknown>|ConnectedLineNum:79828125463|ConnectedLineName:<unknown>|Language:en|AccountCode:|Context:macro-dialout-trunk|Exten:s|Priority:24|Uniqueid:1608203382.4099343|Linkedid:1608203382.4099342|DestChannel:SIP/89587040022-003de744|DestChannelState:6|DestChannelStateDesc:Up|DestCallerIDNum:+79828125463|DestCallerIDName:<unknown>|DestConnectedLineNum:79828125463|DestConnectedLineName:<unknown>|DestLanguage:ru|DestAccountCode:|DestContext:from-trunk-sip-89587040022|DestExten:|DestPriority:1|DestUniqueid:1608203382.4099344|DestLinkedid:1608203382.4099342|DialStatus:ANSWER
Event:DialEnd|Privilege:call,all|DestChannel:Local/+79828125463@from-internal-00000136;1|DestChannelState:6|DestChannelStateDesc:Up|DestCallerIDNum:79828125463|DestCallerIDName:<unknown>|DestConnectedLineNum:79828125463|DestConnectedLineName:<unknown>|DestLanguage:en|DestAccountCode:|DestContext:from-internal|DestExten:+79828125463|DestPriority:1|DestUniqueid:1608203382.4099342|DestLinkedid:1608203382.4099342|DialStatus:ANSWER||||||||||||||
Event:DialBegin|Privilege:call,all|Channel:Local/+79828125463@from-internal-00000136;1|ChannelState:6|ChannelStateDesc:Up|CallerIDNum:79828125463|CallerIDName:Сопровождение:|ConnectedLineNum:79828125463|ConnectedLineName:<unknown>|Language:en|AccountCode:|Context:from-internal|Exten:777|Priority:48|Uniqueid:1608203382.4099342|Linkedid:1608203382.4099342|DestChannel:SIP/107-003de745|DestChannelState:0|DestChannelStateDesc:Down|DestCallerIDNum:107|DestCallerIDName:Tihonov Aleksandr (2)|DestConnectedLineNum:<unknown>|DestConnectedLineName:<unknown>|DestLanguage:ru|DestAccountCode:|DestContext:from-internal|DestExten:|DestPriority:1|DestUniqueid:1608203394.4099345|DestLinkedid:1608203382.4099342|DialString:SIP/107
Event:DialEnd|Privilege:call,all|Channel:Local/+79828125463@from-internal-00000136;1|ChannelState:6|ChannelStateDesc:Up|CallerIDNum:79828125463|CallerIDName:Сопровождение:|ConnectedLineNum:107|ConnectedLineName:Tihonov Aleksandr (2)|Language:en|AccountCode:|Context:from-internal|Exten:777|Priority:48|Uniqueid:1608203382.4099342|Linkedid:1608203382.4099342|DestChannel:SIP/107-003de745|DestChannelState:6|DestChannelStateDesc:Up|DestCallerIDNum:107|DestCallerIDName:Tihonov Aleksandr (2)|DestConnectedLineNum:79828125463|DestConnectedLineName:Сопровождение:|DestLanguage:ru|DestAccountCode:|DestContext:from-internal|DestExten:777|DestPriority:1|DestUniqueid:1608203394.4099345|DestLinkedid:1608203382.4099342|DialStatus:ANSWER
Event:Hangup|Privilege:call,all|Channel:SIP/107-003de745|ChannelState:6|ChannelStateDesc:Up|CallerIDNum:107|CallerIDName:Tihonov Aleksandr (2)|ConnectedLineNum:79828125463|ConnectedLineName:Сопровождение:|Language:ru|AccountCode:|Context:from-internal|Exten:777|Priority:1|Uniqueid:1608203394.4099345|Linkedid:1608203382.4099342|Cause:16|Cause-txt:Normal Clearing|||||||||||||
Event:Hangup|Privilege:call,all|Channel:Local/+79828125463@from-internal-00000136;1|ChannelState:6|ChannelStateDesc:Up|CallerIDNum:79828125463|CallerIDName:Сопровождение:|ConnectedLineNum:107|ConnectedLineName:Tihonov Aleksandr (2)|Language:en|AccountCode:|Context:from-internal|Exten:h|Priority:1|Uniqueid:1608203382.4099342|Linkedid:1608203382.4099342|Cause:16|Cause-txt:Normal Clearing| ||||||||||||
Event:Hangup|Privilege:call,all|Channel:Local/+79828125463@from-internal-00000136;2|ChannelState:6|ChannelStateDesc:Up|CallerIDNum:107|CallerIDName:Tihonov Aleksandr (2)|ConnectedLineNum:79828125463|ConnectedLineName:<unknown>|Language:en|AccountCode:|Context:from-internal|Exten:h|Priority:1|Uniqueid:1608203382.4099343|Linkedid:1608203382.4099342|Cause:16|Cause-txt:Normal Clearing|||||||||||||