php action 路径问题,ThinkPhp表单 action的路径问题

我支付宝写了个表单提交,然后写在Action模块里面有方法可以接收,请问我该怎么写这个form表单里action的路径呢,新手,求指教

回复讨论(解决方案)

ThinkPhp 约定的伪静态路径为:模块名/方法名[[/参数名/参数值]...]

action="__URL__/action"

function alipay() {

$this->submit_url='';

}

function create_form($list) {

$pname=get_class($this);

$this_script = "http://{$_SERVER['HTTP_HOST']}";

$this->add_field ( 'ordsubject', 'Products For SN:' . $list ['sn'] ); //产品名称

$this->add_field ( 'trade_no', $list ['sn'] ); //订单号码

$this->add_field ( 'ordtotal_fee', $list ['orders_total'] ); //交易价格

$this->form.= " $this->form.= "action=\"". $this->submit_url ."\">\n";

foreach ($this->fields as $name => $value) {

$this->form.= "\n";

}

$this->form.= "\n";

if(GetSettValue($list['payment_module_code'].'_autosubmit')==1){

$delay=GetSettValue($list['payment_module_code'].'_delay');

$delay=$delay?$delay:5;

$this->form.=$this->submit($delay);//是否自动提交,延迟5秒

}

return $this->form;

}

上面是我的代码,我的都是写在Lib的文件夹里的,不是写在模版上的

本文原创发布php中文网,转载请注明出处,感谢您的尊重!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值