如何正确调用WordPress URL中的.php


How to call the .php in WordPress URL properly?

我有 2 个 php 文件。一个用于获取用户输入的电子邮件(订阅),加密该电子邮件并向用户发送带有确认链接的电子邮件。第二个,用于解密电子邮件。

这 2 个 php 文件正在工作,但是当我单击确认链接时,我遇到了一个错误,例如"哎呀!找不到该页面。

这是实时网址 http://bit.ly/1n718S1

我 https://wordpress.stackexchange.com/questions/39765/how-to-add-a-php-file-to-wordpress 尝试过这个解决方案,但它不起作用

注意:我只将这 2 个 PHP 文件用于特定页面

这是链接 http://bit.ly/1NDAnQA

这是第一个PHP文件的一些PHP脚本

$subscriptions = $_POST['subscriptions'];
if(isset($_POST['submit'])){
if(!($_POST['subscriptions']=="")){
    $subscriptions= $_POST['subscriptions'];
    function encryptLink($string){
        $key = "123456789";
        $qryStr = "email=".$string1;
        $query = base64_encode(urlencode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $qryStr, MCRYPT_MODE_CBC, md5(md5($key)))));
        $link = "_confirmation.php?".$subscriptions.''.$query;
        $baseURL = "http://homecredit.ph/testEnvironment/";
        return $link;
    }
        $pagelink = encryptLink($string);
        $string = $subscriptions;
        //Email Details
        $mail_to = $subscriptions;
        $from_mail = "";
        $from_name = "";
        $reply_to = "";
        $subject = "Email Verification";
        $message_body = 'Hey, http://homecredit.ph/testEnvironment/'.$pagelink.'';

当您调用.php时,请确保包含它的完整路径:

例如

http://homecredit.ph/testEnvironment/yourfile.php
http://homecredit.ph/testEnvironment/yourfile2.php

(如果这不起作用,请尝试在服务器中启用"fopen"php 函数)