【发布时间】:2015-07-03 10:31:06
【问题描述】:
我正在学习 PHP,但我认为 filter_input 函数有问题。
<?php
if (!isSet(filter_input(INPUT_COOKIE, 'nazwa')) && !isSet(filter_input(INPUT_GET, 'nazwa')))
{
include ("header.html");
include 'form.html';
include 'footer.html';
}
else if (isset(filter_input(INPUT_GET, 'nazwa'))) {
setcookie("nazwa", (filter_input(INPUT_GET, 'nazwa')), time() + 60*60*24*365);
include 'header.html';
echo "<p> Dziękujemy za podanie danych.</p>";
include 'footer.html';
}
else {
include 'header.html';
echo "Witamy, zostałeś rozpoznany jako {filter_input(INPUT_COOKIE, 'nazwa')}.";
include 'footer.html';
}
?>
我明白了:
致命错误:无法在第 4 行 C:\Users\User\Documents\NetBeansProjects\PhpProject3\cookie\index.php 的写入上下文中使用函数返回值
你能帮帮我吗?
【问题讨论】:
-
谢谢Maximus2012,你的小费帮助了我。
标签: php if-statement fatal-error filter-input