我使用 jframe,embed 来查看 pdf 文件。但是有一个下载选项,但我需要 pdf 作为只读模式..即用户只能查看该文件,他无法下载该文件..我想解决这个问题问题。这是我的代码
<embed src="cover.pdf" width="800px" height="2100px" />
Run Code Online (Sandbox Code Playgroud)
当我使用此代码时:
Route::get('/user/{id}/posts', function ($id){
$post = User::find($id)->postst;
return $post;
});
Run Code Online (Sandbox Code Playgroud)
输出为:
[
{
"id":1,
"user_id":1,
"title":"Eloquent Basic Insert",
"content":"By eloquent we can easily insert a data and it is awesome",
"created_at":"2018-05-15 14:45:34",
"updated_at":"2018-05-15 14:45:34",
"deleted_at":null
},
{
"id":2,
"user_id":1,
"title":"Add with create",
"content":"This might be fail",
"created_at":"2018-05-15 14:47:59",
"updated_at":"2018-05-15 14:47:59",
"deleted_at":null
}
]
Run Code Online (Sandbox Code Playgroud)
但是当我使用foreach循环时,它仅显示数组之一
Route::get('/user/{id}/posts', function ($id){
$post = User::find($id)->postst;
foreach ($post as $post){
return $post->title. '<br>';
}
});
Run Code Online (Sandbox Code Playgroud)
此代码的输出为:
雄辩的基本插入
如何在浏览器上显示数组的所有标题?我的代码有什么问题?
我是计算机科学专业的学生.在我的第五学期,我必须学习汇编语言.在我班上6/7周后,我才知道这种汇编语言学习将教会我关于微处理器的知识.但我想知道2018年学习集会有什么优势???
我使用了那些 css 代码
.logo h2 {
font-family: Pacifico, MyriadPro-Regular, AdobeInvisFont;
font-size: 42pt;
color: rgba(71, 71, 71, 255);
text-align: left;
}Run Code Online (Sandbox Code Playgroud)
但它不起作用。我该怎么办?