MediaWiki 安装上的 PHP 和 MySQL
我已经安装了 SecurePHP 扩展来执行一些 PHP 编码,但在接收通过 URL 发布的数据时遇到问题。
例如,我创建一个链接来传递如下信息: http://server.com/pagename ?process=lock&server=newserver 我也尝试过: http://server/index.php?title=pagename&process=lock&server=newserver
然后在名为 pagename 的新页面上,我尝试使用 php 从 URL 获取变量
$_GET['进程']; $_GET['服务器'];
等等,但是不起作用。我愿意尝试的另一个解决方案是将一个全新的 php 页面放在服务器的根目录中。 /webroot/lock.php
Apache 没有报告 404,但该页面没有显示我放置在文件中的数据。关于如何将变量从一个页面传递到另一个页面以执行 MySQL 查询,有什么想法吗?
I have installed the extension SecurePHP to do a little bit of PHP coding, but I am having problems receiving data posted through the URL.
For example, I create a link to pass information like: http://server.com/pagename?process=lock&server=newserver I have also tried: http://server/index.php?title=pagename&process=lock&server=newserver
Then on the new page called pagename, I try to get the variables from the URL with php
$_GET['process'];
$_GET['server'];
And so on, but it's not working. Another solution I was willing to try was to put a brand new php page in the root of the server. /webroot/lock.php
Apache isn't reporting a 404, but the page isn't displaying the data I place in the file. Any ideas on how I can pass variables from on page to another to perform a MySQL query?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议查看以下输出:
看看您是否可以从那里提取有关请求的任何有用信息
I would suggest having a look at the output of:
to see if you can pull any useful info about the request from there