doufu1504 2011-04-20 17:58
浏览 27
已采纳

如何从其他网站(我控制)获取代码?

I want to enter a line of php into my site and have it echo out code that is to be entered on my site. Essentially I am controlling a part of a clients' site and it is more convenient for all involved if I can change it without requiring them to upload it. This must be a long solved issue, but I cannot find a solution. Also, I am not sure if this is possible if my code is server side. Thoughts, help, suggestions?

  • 写回答

5条回答 默认 最新

  • duanna1407 2011-04-20 18:07
    关注

    You should figure out a different approach to fixing this problem. From the top of my head, you could probably write a utility that allows, with a username and password, you to replace specific files.

    Using code from another site, even if you control it, is incredibly dangerous. All a would-be attacker has to do is spoof the address through one of many means, and they could literally do anything on the server that the script has privileges to do. For completeness, you are looking for "eval", but you want to use a different approach.

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

报告相同问题?

悬赏问题

  • ¥15 ogg dd trandata 报错
  • ¥15 高缺失率数据如何选择填充方式
  • ¥50 potsgresql15备份问题
  • ¥15 Mac系统vs code使用phpstudy如何配置debug来调试php
  • ¥15 目前主流的音乐软件,像网易云音乐,QQ音乐他们的前端和后台部分是用的什么技术实现的?求解!
  • ¥60 pb数据库修改与连接
  • ¥15 spss统计中二分类变量和有序变量的相关性分析可以用kendall相关分析吗?
  • ¥15 拟通过pc下指令到安卓系统,如果追求响应速度,尽可能无延迟,是不是用安卓模拟器会优于实体的安卓手机?如果是,可以快多少毫秒?
  • ¥20 神经网络Sequential name=sequential, built=False
  • ¥16 Qphython 用xlrd读取excel报错