Home  >  Article  >  Backend Development  >  php 绝对路径和相对路径混合+支付宝回调处理

php 绝对路径和相对路径混合+支付宝回调处理

WBOY
WBOYOriginal
2016-06-06 20:10:521030browse

/**

  • 支付宝返回地址
    *

  • */

$_GET['act'] = 'payment';
$_GET['op'] = 'return';
$_GET['payment_code'] = 'alipay';
require_once(dirname(__FILE__).'/../../../index.php');
?>

1.dirname(__FILE__).'/../../../index.php 这是什么鬼?
2.这是支付宝回调处理的地方吗?~? 具体该去哪写回调处理?
用的的程序自带的支付宝api =。= 我都不知道版本

回复内容:

/**

  • 支付宝返回地址
    *

  • */

$_GET['act'] = 'payment';
$_GET['op'] = 'return';
$_GET['payment_code'] = 'alipay';
require_once(dirname(__FILE__).'/../../../index.php');
?>

1.dirname(__FILE__).'/../../../index.php 这是什么鬼?
2.这是支付宝回调处理的地方吗?~? 具体该去哪写回调处理?
用的的程序自带的支付宝api =。= 我都不知道版本

那是加载当前的页面,比如说支付过程中,加一些状态或者loading图片,自己来写。如果不需要的话,为空即可,使用默认支付图片和状态处理

具体处理你需要看代码才知道。
那句话是,取当前目录,上翻三次,然后下面有个index.php,加载进来。你要看这个index.php里面处理什么

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn