简体   繁体   English

以某种方式访问​​Javascript输出?

[英]Somehow accessing Javascript output?

So, 所以,

Say there's a remote PHP file that's generating some output in JavaScript. 假设有一个远程PHP文件正在JavaScript中生成一些输出。
I can do <script src='some_file.php type='text/javascript'></script> , and the code will run, but when I click View Source it just shows the above code. 我可以执行<script src='some_file.php type='text/javascript'></script> ,该代码将运行,但是当我单击“查看源代码”时,它仅显示上面的代码。 Is there any way I can access the actual code that that PHP file is running? 有什么办法可以访问该PHP文件正在运行的实际代码?

Also, when I right click on the output of the javascript and go to 'this frame' -> 'view frame source' I get the actual output. 另外,当我右键单击javascript的输出并转到'this frame'->'view frame source'时,我得到了实际的输出。 I want to be able to use it. 我希望能够使用它。

This is inherently impossible. 这本质上是不可能的。

PHP runs on the server; PHP在服务器上运行; the browser is never aware of it. 浏览器永远不会意识到这一点。

Nope, PHP runs on the server and generates a html code as shown in your browser. 不会,PHP在服务器上运行,并生成一个HTML代码,如浏览器所示。 Do you want it to show? 您要显示吗?

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

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