Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我怎样才能获取这行代码中的任何值,例如该值是 file.php
include filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING);
然后把它放在一个看起来像这样的隐藏字段中
<input type="hidden" name="file_name" value="">
以便放置的值可用于保存到文件输入的任何内容?
尝试:
$name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING); <input type="hidden" name="file_name" value="<?php echo $name; ?>">
或者如果您打开了 short_tags
<input type="hidden" name="file_name" value="<?=$name?>">