dongwai4434 2012-04-05 21:06 采纳率: 0%
浏览 151

使用php将嵌入js加载到页面中以将其隐藏在源代码中?

ive got a script i need to load into a page but its sensitive so i dont want to have to reveal the source of the script. Im aware that js runs client side, but is there some way i could load it server side with php / or just embed it server side to still be run on the users system ?

The script itself is a simple external js script like this :

<script type="text/javascript" src="myscripts.js"></script> 

cheers

  • 写回答

3条回答 默认 最新

  • douhun7609 2012-04-05 21:08
    关注

    You could conceal the source location of the script that way, but not the source code. If you want it to execute on the client then you must sent it to the client. If you send it to the client then the user can execute it. Don't put secret business logic on the client side, handle it server side.

    评论

报告相同问题?

悬赏问题

  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试