问题列表 - 第16312页

链接到pdf中的强制下载脚本

我正在使用PHP生成动态PDF报告,并且在链接到Web时遇到了一些问题.

我的链接是一个强制下载文件附件的PHP脚本.当通过浏览器访问时,此脚本可在所有浏览器中完美运行.它也可以在除Internet Explorer之外的所有浏览器中使用PDF.

而不是IE将文件视为PDF,PNG或任何文件,下载提示说文档类型是:"HTML插件文档"

如果用户单击"打开"或"保存",IE表示无法下载文件并将文件名设为"index2.php".这是地址URI的开头.

给出了正确的文件大小,所以我知道它正在获取文件.也许这是一个标题问题?

这是我在下载脚本上创建的标题:

            header("Expires: Mon, 26 Jul 1997 05:00:00 GMT;");
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT;");
    header("Pragma: no-cache;");        // HTTP/1.0
    header('Content-Type: '.$file->file_mime_type.';');
    header("Content-Description: File Transfer");
    header("Cache-Control: public");
            header('Content-Disposition: attachment; filename="'.$file->file_name.'";');
    header('Content-Length: '.$file->file_size.';');
    header('Content-transfer-encoding: binary');
Run Code Online (Sandbox Code Playgroud)

任何投入将不胜感激.

php pdf internet-explorer-8 internet-explorer-7 internet-explorer-6

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

原型/ Mootools冲突问题

所以我有一个使用Prototype和Mootools AJAX脚本的页面.

还有更多Mootools Prototype,所以我想知道Prototype是否有类似jQuery的功能$j = jQuery.noConflict();,我可以用来重新定义Prototype的$别名?

谢谢!

jquery mootools conflict prototypejs

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

iOS UINavigationBar vs UIToolbar vs UITabBar

让我知道在哪种情况下应该使用哪一个.

它们之间有什么区别?

每个组件的优点和缺点是什么?

iphone xcode interface-builder ios

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

如何将`git:`urls转换为`http:`urls

我在http代理后面工作.我正在尝试使用他们的"repo"工具克隆Android的源代码树.

此工具坚持使用git://URL,即使http://URL也有效.结果,我无法下载源代码.

有可能强制git总是使用http吗?

编辑:我的http_proxy配置正确.例如,这有效:

git clone http://android.git.kernel.org/platform/manifest.git
Run Code Online (Sandbox Code Playgroud)

但这不会(错误=连接超时):

git clone git://android.git.kernel.org/platform/manifest.git
Run Code Online (Sandbox Code Playgroud)

所以这个答案并没有真正帮助我.

git proxy

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

使用Tablediff比较所有表

我最近发现了SQL Server 2005的tablediff实用程序.

我在不同的服务器上有两个相同数据库的实例.

是否可以使用tablediff比较所有表,而不必在仅更改表名的情况下复制相同的命令?

例如,将server1上的table1与server2上的table1进行比较,然后将server1上的table2与server2上的table2进行比较,直到比较了所有表.

sql sql-server

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

通信对象不能用于通信,因为它已被中止

我有一个示例WCF项目,它重现了我的真实WCF应用程序的问题.您可以在此处下载我的示例WCF应用程序的源代码

根据代码和配置文件中的超时集,我不明白出现了什么:

**** Server exception : System.ServiceModel.CommunicationObjectAbortedException: 

The communication object, System.ServiceModel.Security.SecuritySessionServerSettings+SecurityReplySessionChannel, cannot be used for communication because it 
has been Aborted.

   at System.ServiceModel.Channels.CommunicationObject.ThrowIfClosedOrNotOpen()
   at System.ServiceModel.Security.SecuritySessionServerSettings.ServerSecuritySessionChannel.SecureApplicationMessage(Message& message, TimeSpan timeout, SecurityProtocolCorrelationState correlationState)
   at System.ServiceModel.Security.SecuritySessionServerSettings.SecuritySessionRequestContext.OnReply(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.RequestContextBase.Reply(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.RequestContextBase.Reply(Message message)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.Reply(MessageRpc& rpc)

**** client exception : : System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. ---> System.ServiceModel.FaultException: The message …
Run Code Online (Sandbox Code Playgroud)

wcf

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

如何在Windows上运行应用程序使用visual c ++在win32 API中启动

我在visual c ++中有一个Window(win32 API)应用程序.我没有使用MFC.我必须在Windows启动时运行我的应用程序.我正在使用Windows 7和visual studio 2008.任何人都可以帮助我完成上述任务吗?提前致谢.

registry winapi visual-c++

3
推荐指数
2
解决办法
5814
查看次数

如何点击javascript中的链接

我想使用javascript点击我页面中的链接.我想在没有导航的情况下在链接上触发事件处理程序.如何才能做到这一点?

谢谢

javascript

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

在Windows下的JFrame中禁用默认ALT键操作

我想,让我在Windows下的JFrame 经的行为ALT按键.为了澄清,当您执行以下代码片段时:

import javax.swing.*;

public class FrameTest {
    public static void main(String[] args) throws Exception {
        JFrame frame = new JFrame();
        frame.setSize(400, 400);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);
    }
}
Run Code Online (Sandbox Code Playgroud)

然后ALT按键然后arrow down按键,你会在左上角看到一个菜单,你可以选择最小化,移动,关闭等框架(至少我明白了).我想禁用它:即.JFrame不应该"听"这些ALT印刷机.

我相信某些Windows组件默认响应ALT键,因为当我向框架添加菜单栏并明确设置外观和感觉时,菜单(File)现在会在按下ALT键后自动选择:

import javax.swing.*;

public class FrameTest {
    public static void main(String[] args) throws Exception {
        JFrame frame = new JFrame();
        frame.setSize(400, 400);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JMenuBar menuBar = new JMenuBar();
        JMenu menu = new JMenu("File");
        menuBar.add(menu);
        frame.setJMenuBar(menuBar);
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); …
Run Code Online (Sandbox Code Playgroud)

java windows swing

5
推荐指数
2
解决办法
5443
查看次数

RhinoMocks - 存根返回参数的方法

我正在使用RhinoMocks,我需要存根一个方法,并且总是让它返回第三个参数,无论传入什么:

_service.Stub(x => x.Method(parm1, parm2, parm3)).Return(parm3);
Run Code Online (Sandbox Code Playgroud)

显然,这并不容易.我并不总是知道parms会是什么,但我知道我总是希望返回第3个.

unit-testing rhino-mocks mocking stubbing

36
推荐指数
2
解决办法
2万
查看次数