简体   繁体   English

多个GET或POST变量404的wordpress页面(数字永久链接)

[英]Multiple GET or POST variables 404's wordpress pages (numeric permalinks)

I am developing a live-action tag game (called DeTag) that uses a web interface for reporting kills. 我正在开发一个使用Web界面报告杀人事件的真人标签游戏(称为DeTag)。 When a user wants to report a tag they go to a page to confirm who and when they tagged, then actually "kill" them (called pre-tag.php and tag.php respectively). 当用户想要报告标签时,他们会转到页面以确认他们以及何时添加标签,然后实际上“杀死”了它们(分别称为pre-tag.php和tag.php)。 However in trying both POST and GET data for the three variables I need (userID, tag hour and tag minute,) the page 404's. 但是,在尝试POST和GET数据这三个变量(用户ID,标记小时和标记分钟)时,需要使用页面404。 Here is the URL that I am using: 这是我正在使用的URL:

.../detag/kill?targetID=xxxxxxx&hour=XX&minute=XX

That will cause Wordpress (2.1.7) to 404. Tried using both POST and GET data. 这将导致Wordpress(2.1.7)变为404。尝试同时使用POST和GET数据。 However, when I use this link (with only one GET variable): 但是,当我使用此链接(只有一个GET变量)时:

.../detag/kill?targetID=xxxxxxx

It works...Of course, it doesn't push the time, but it goes through. 它的工作原理是……当然,它不会浪费时间,但它会持续进行。 Is there something in PHP and/or Wordpress that would create this situation? PHP和/或Wordpress中是否有某些东西会造成这种情况?

If you need more code, please let me know. 如果您需要更多代码,请告诉我。

I am using the runphp plugin to run php code on the Wordpress pages. 我正在使用runphp插件在Wordpress页面上运行php代码。 Thanks. 谢谢。

You'd better use somethink like this : 您最好使用这样的方法:

.../detag/kill?targetID=xxxxxxx[]hour=XX[]minute=XX

And in php, use explode function to get the parameters. 在php中,使用explode函数获取参数。

Our problem was with the type of permalinks we had enabled in WordPress. 我们的问题是我们在WordPress中启用的永久链接的类型。 We changed to the combination enabled links and used semicolons as our variable delimiter. 我们更改为启用组合的链接,并使用分号作为变量定界符。

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

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