我可以在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) 我想做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?
在Scala中,数组总是通过引用传递,按名称调用,对吧?
所以,
def fun(ar: Array[Int]) = {}
Run Code Online (Sandbox Code Playgroud)
等于
def fun(ar: => Array[Int]) = {}
Run Code Online (Sandbox Code Playgroud)
谢谢.