通过您的ftp工具或主机后台登入您的php虚拟主机,进入您网站的根目录(通常是进入public_html目录)下的找到所使用的模板templates文件夹,找到相应模版下的index.php文件,也有的是header.php文件;

把以下代码复制到对应的文件的<head></head>内就可以了

<script language="javascript"> document.oncontextmenu=new Function("event.returnValue=false;");
//屏蔽右键 
document.onselectstart=new Function("event.returnValue=false;");
//屏蔽鼠标拖动 
</script> 
<!--禁止另存为--> 
<noscript>
<iframe>
</iframe>
</noscript

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。