PHP页面不尊重我的脚本.. [英] PHP pages don't respect my script..

查看:41
本文介绍了PHP页面不尊重我的脚本..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,昨天我在2个月前开发的脚本出现问题。


此脚本的目标是检测包含在中的链接中的点击事件网页,当发生这种情况时,脚本应该修改链接的URL,将我们选择的字符串放在原始URL之后。


脚本的代码如下所示:

Hello everybody, yesterday I had a problem with a script that I developed about 2 months ago.

The goal of this script is to detect the click events in the links contained in Web pages and, when this happens, the script should modify the URL of the links putting a string of our choice after the original URL.

The code of the script is shown next:

展开 | 选择 | 换行 | 行号

推荐答案


但是当我在传输的页面上进行尝试(并在运行中修改,将调用添加到我的脚本中)时,它不再起作用了, 怎么了?
But when I try it on pages that are transmitted (and modified on the fly, adding the call to my script), it does not work anymore, what''s wrong?



PHP有什么不同吗?你如何在PHP页面中添加它?

Is it any different in PHP? How do you add it in the PHP page?


好吧,我不完全修改PHP,我只是把脚本调用放在HTML页面中。所以我认为我的脚本不起作用,因为我在本地的页面是PHP在Web中显示的结果:一个HTML页面,因为你知道PHP代码是在服务器端执行的,因此无法下载PHP的代码页面。因此,如果我是对的,脚本永远不会工作,因为Web页面的主要执行在服务器中,它向我们显示像HTML的页面,所以如果我用任何JS修改这个HTML,脚本调用是不会在页面中产生任何影响,对吧?

那我该怎么办?我希望你能提出一些建议我真的很感激。

亲切的问候
Well, I''m not exactly modify the PHP, I just put the script calling in the HTML page. So I think my script does not work because the page I have locally is the result of what PHP show us in Web: a HTML page, as you know PHP code is executed in the server side so is not possible to download the code of PHP pages. Thus if I''m right, the script never going to work because the main execution of the Web page is in the server and it shows us the page like a HTML, so if I modify this HTML with any JS, the script call is not going to take any effect in the page, right?
So what can I do? I hope you can give some advices I really appreciate it.
Kind regards



嗯,我''我没有完全修改PHP,我只是把脚本调用在HTML页面中。所以我认为我的脚本不起作用,因为我在本地的页面是PHP在Web中显示的结果:一个HTML页面,因为你知道PHP代码是在服务器端执行的,因此无法下载PHP的代码页面。因此,如果我是对的,脚本永远不会工作,因为Web页面的主要执行在服务器中,它向我们显示像HTML的页面,所以如果我用任何JS修改这个HTML,脚本调用是不会在页面中产生任何影响,对吧?
Well, I''m not exactly modify the PHP, I just put the script calling in the HTML page. So I think my script does not work because the page I have locally is the result of what PHP show us in Web: a HTML page, as you know PHP code is executed in the server side so is not possible to download the code of PHP pages. Thus if I''m right, the script never going to work because the main execution of the Web page is in the server and it shows us the page like a HTML, so if I modify this HTML with any JS, the script call is not going to take any effect in the page, right?



你是对的。如果正确包含该脚本,则会对页面产生影响。发布代码或指向测试页的链接。

You were right up to this point. The script, if included correctly, can have an effect on the page. Post the code or a link to a test page.


这篇关于PHP页面不尊重我的脚本..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆