简体   繁体   English

ViewerJS服务器拒绝连接

[英]ViewerJS The server refused the connection

noob question... 新手问题...

I have incorporated ViewerJS in my website 我已经在我的网站中加入了ViewerJS

Code: 码:

 <iframe src = "http://localhost/VADHOD//ViewerJS/#../pdf/UthMaio.pdf" width = "750" height='900' allowfullscreen webkitallowfullscreen></iframe>

It working fine on my localhost on XAMPP server 它在XAMPP服务器上的本地主机上正常工作

But when i uploaded to my hosting provider 000webhost... 但是当我上传到托管服务商000webhost时...

It doesnt load and shows 它不加载并显示

The server refused the connection 服务器拒绝连接

Do i need to activate php somehow on cPanel like I start Apache service in my xampp control panel? 我是否需要在cPanel上以某种方式激活php,就像我在xampp控制面板中启动Apache服务一样?

问题出在您的链接URL ...您已将其设置为localhost ..删除该链接

<iframe src = "/ViewerJS/#../pdf/UthMaio.pdf" width = "750" height='900' allowfullscreen webkitallowfullscreen></iframe>

There are a couple of things that you need to check/verify here: 您需要在此处检查/验证以下几点:

  • you can try to replace localhost with the actual IP address or server hostname/domain that you have with your hosting provider; 您可以尝试使用托管服务提供商提供的实际IP地址或服务器主机名/域替换localhost;

  • you need to make sure that the path is correct; 您需要确保路径正确;

  • please pay attention to the names of the folders and files as in unix/linux (I assume you are on a linux server) paths are case sensitive and capital letters matter; 请注意文件夹和文件的名称,就像在unix / linux(我假设您在linux服务器上)中一样路径区分大小写,大写字母很重要;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM