好的,这是我的代码.它应该做的是检索发送给您页面的引用者,用户将输入someurl.com/refcreate.php?ref=username
<?php
session_start();
$referer = $_GET['ref'];
$_SESSION['referer'] = $referer;
if (!isset($referer))
{
echo 'You did not specify a referer, please correct this to continue';
die;
}
elseif($referer == "")
{
echo 'You did not specify a referer, please correct this to continue';
die;
}
Run Code Online (Sandbox Code Playgroud)
如果忘记指定引用者,上面的部分工作正常.下面的一半是检查指定的当前引用是否是数据库中的实际用户.
if(refcheck($referer) = false)
{
echo 'that referer is not in our database,please double chek the spelling and try again.';
die;
}
function refcheck($ref)
{
require('mysql_con.php');
$query="SELECT username FROM jos_users WHERE username='". $ref ."'";
echo $query; …Run Code Online (Sandbox Code Playgroud) so my issue is according to the documentation (wich is pretty slim and not the greatest) the xml i have is everything that is required, but im getting this error code back
<?xml version="1.0" encoding="UTF-8"?>
<Error><Number>80040B19</Number><Description>XML Syntax Error: Please check the XML request to see if it can be parsed.</Description><Source>USPSCOM::DoAuth</Source></Error>
Run Code Online (Sandbox Code Playgroud)
这对我来说没有多大意义,因为我的帐户处于生产模式,而且正如我根据文档所说,我拥有所需的一切,我花了最后两天的时间使此功能正常工作。
VerifyAddress函数工作正常,但RateCheck函数不起作用。
class USPS
{
protected $Endpoint = 'http://production.shippingapis.com/ShippingAPI.dll';
protected $SecureEndpoint = 'https://secure.shippingapis.com/ShippingAPI.dll';
protected $TestEndpoint = 'http://stg-production.shippingapis.com/ShippingAPI.dll';
protected $TestSecureEndpoint = 'https://stg-secure.shippingapis.com/ShippingAPI.dll';
private $username = 'example’;
function VerifyAddress($address1, $address2, $city, $state, …Run Code Online (Sandbox Code Playgroud)