【发布时间】:2018-05-05 15:06:33
【问题描述】:
我编码adding comments function to RSS articles
一波三折,在php编码中显示和输入cmets。但是,输入框不会出现。
这里是php代码:
$url = "./comments/" . $q.".txt";
//댓글 파일에서 컨텐츠 문자열 가져오기
$txtcomment = file_get_contents($url,true);
//댓글 나열
echo "<ol>";
if ($q !== "" ) {
$comm = $txtcomment;
$arr = [];
$arr = explode("--",$comm);
for ($i=4;$i<count($arr);$i++) {
echo "<li>".$arr[$i]."</li>";
}
} else {
echo "해당기사가 없습니다.";
}
echo "</ol>";
//중첩검색&결과내 검색 폼 만들기
echo "<br><form class=\"category B\" >
Comment: <input type=\"text\" name=\"comment1\" id=\"comment1\" onkeyup=\"inputComment()\" >
</form>";
为什么? 感谢您的关心。
【问题讨论】:
-
使用浏览器开发工具查看它是否只是隐藏,因为你没有标准的有序列表,所以它可能是 CSS。您也可以在 PHP 中使用单引号:/
-
页面的源代码(脚本的 HTML 输出)是什么样的?
-
@LawrenceCherone 是的,谢谢你的单引号评论。之后,我会使用它。但是,输入框不是静止的。 CSS没有关于输入标签的隐藏功能。
-
@stickybi stackoverflow.com/questions/50181624/… 是我之前完成的编码。因为输入框不是,我无法编写js inputComment()。
-
@stickybit 抱歉,我编辑了我的帖子。网址错误。