小编use*_*311的帖子

外部URL的PHP​​ readfile()

我可以在readfile()中使用外部URL吗?

    header('Content-type: application/pdf');
    header('Content-Transfer-Encoding: binary');
    header('Content-Disposition: inline; filename="'.$file.'" ');
    //header('Content-Length: ' . filesize("http:...z/pub/".$file.'.pdf'));
    @readfile("http://...z/pub/".$file.'.pdf');
Run Code Online (Sandbox Code Playgroud)

php readfile

9
推荐指数
1
解决办法
3万
查看次数

XMLHttpRequest在浏览器中打开PDF

我想做XMLHttpRequest然后通过POST方法发送文件名在浏览器中打开PDF.

   xmlhttp.open("POST","pdf.php",true); //CHANGE
   xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
   xmlhttp.send("file="+input);
Run Code Online (Sandbox Code Playgroud)

这是可能的还是XMLHttpRequest只适用于HTML?

html php pdf ajax xmlhttprequest

3
推荐指数
1
解决办法
1万
查看次数

Scala,数组总是按名称调用,对吧?

在Scala中,数组总是通过引用传递,按名称调用,对吧?

所以,

def fun(ar: Array[Int]) = {}
Run Code Online (Sandbox Code Playgroud)

等于

def fun(ar: => Array[Int]) = {}
Run Code Online (Sandbox Code Playgroud)

谢谢.

arrays scala pass-by-reference

1
推荐指数
1
解决办法
1052
查看次数

标签 统计

php ×2

ajax ×1

arrays ×1

html ×1

pass-by-reference ×1

pdf ×1

readfile ×1

scala ×1

xmlhttprequest ×1