<?php
include("/Crypt/RSA.php");
$rsa = new Crypt_RSA();
$token=base64_decode("iKmHdK3ChRBPAU/I/wTKld4up91TMrcWjkE+VGggVryRzvhKC6l+sZ3F+j+qyW8rxg01/uu2E3z6aVirwmQ0ig==");
$private=base64_decode("MIIBVQIBADANBgkqhkiG9w0BAQEFAASCAT8wggE7AgEAAkEAyUFH4OJOUOKh38raMxiQhmtuNSMxcznSdt9fWiJZOYpnv1rbu3h/heNCIOxOHSrlMz8FAKAW6rd9ddXNcm4myQIDAQABAkEApGbPcMVtdGWuFkJ/PH40kZnwzTeSja4OX0zZd6fXe0hBZZjA1nREuLGh2x7OXkpArytgQ35W2NHCxeldniTmgQIhAO7SB0Mhb/HLst4ty6HT2kZoAC/N2UdsBtQFdC8sNNxXAiEA17t4cVsx5EYYFifDSUwawz5pJSfrQYk1C0H1atL9Id8CIQDOtJL8k7BkxD5o95JM2yUN02518eGiY+n1EVNikQyfuQIgdph88fQsTU2rWCKr3NOVstfQfbigP/rpyjKMdBlhRwkCIE/x13OF2JUHlA5DqxCVh3LHMDDowr7SkQ2QVkqfBcAb");
$rsa->loadKey($privateKey);
echo $rsa->decrypt($cipher);
?>
我将include_path保留为.:/usr/local/lib/php
我收到这样的错误:
警告:include(/Crypt/RSA.php)[function.include]:无法打开流:第2行/home/futureti/public_html/reg2.php中没有此类文件或目录
警告:include()[function.include]:在/ home / futureti / public_html /中打开包含(include_path ='。:/ usr / local / lib / php')的'/Crypt/RSA.php'失败第2行的reg2.php
致命错误:第3行/home/futureti/public_html/reg2.php中找不到“Crypt_RSA”类
答案 0 :(得分:1)
试试这个:
include('../Crypt/RSA.php');
您当前的领先/
正在创建绝对链接,因此请回到您的根目录。
../
表示一个文件夹。
答案 1 :(得分:0)
尝试使用文档根变量:
$doc_root = $_SERVER['DOCUMENT_ROOT'];
include($doc_root . "/Crypt/RSA.php");