问题:请创建一个工具来生成添加
rd
预期使用方式:
<?php
$file = 'BinarySearch.pdf';
$filename = 'BinarySearch.pdf';
header('Content-type: application/pdf');
header('Content-Disposition: inline; filename = "' .$filename . '"');
header('Content-Transfer-Encoding: binary');
header('Accept-Ranges: bytes');
@readfile($file);
?>
在另一个模块中:
{% for comment in comments %}
<li contenteditable = "TRUE" >{{comment.text}}
<form contenteditable = "FALSE" action = "{% url 'clickedaccept' %}" method = "POST">
{% csrf_token %}
<input type = "hidden" name = "acceptedvalue" value = "{{comment.id}}">
<input type = "hidden" name = "selected_option" value = "{{selected_option}}">
<input type = "hidden" name = "selected_autocomplete" value = "{{selected_autocomplete}}">
<input type = "submit" value = "Accept" id = "{{comment.id}}" >
</form>
{% endfor %}
</li>