doucheng5209 2011-12-11 13:25
浏览 40
已采纳

如何在服务器端使用JavaScript代码?

I have used javascript (and jquery) to use google api for its search engine. But now I think it must be done on server side.Using it on client side can expose some critical portion of site to client and make it vulnerable. Is there anyway I can port that javascript code as it is on server side.
I am using php as server side script.

  • 写回答

3条回答 默认 最新

  • doufei1852 2011-12-11 13:27
    关注

    You probably want to port whatever code you are using to PHP, or rewrite it. There is no easy way to execute JavaScript in PHP, but most often, rewriting the code is fairly easy.

    JavaScript can be used on server side, but this requires massively reconfiguring the server, and getting into a completely new technology. It is most likely not what you want.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥50 h5唤醒支付宝并跳转至向小荷包转账界面
  • ¥15 算法题:数的划分,用记忆化DFS做WA求调
  • ¥15 chatglm-6b应用到django项目中,模型加载失败
  • ¥15 武汉岩海低应变分析软件,导数据库里不显示波形图
  • ¥15 CreateBitmapFromWicBitmap内存释放问题。
  • ¥30 win c++ socket
  • ¥30 CanMv K210开发板实现功能
  • ¥15 C# datagridview 栏位进度
  • ¥15 vue3页面el-table页面数据过多
  • ¥100 vue3中融入gRPC-web