dongle3217 2015-05-13 05:52
浏览 30

从php函数中的另一个目录运行php文件

User choose "ACCEPTED" from dropdown menu and click submit button, after that test.php of these path plus given below function must execute. How i will able to do this?

Path:

/var/www/html/demo/courier/test.php

Here is the function:

  if($testcodPayment->getMethodInstance()->getTitle() == 'Cash On Delivery' && $status == $statusAccepted && ($checkTrack12[0]['number']=='') && $selectCourier == 'couriername'){

include '/var/www/html/demo/courier/test.php' ;

            $awbNumbercouriername = $hlp->couriernameawbgenerate('couriername',$id);
            $title = Mage::getStoreConfig('carriers/'.$method[0].'/title', $store);
                        $track = Mage::getModel('sales/order_shipment_track')
                            ->setNumber($awbNumbercouriername)
                            ->setCarrierCode($method[0])
                        ->setCourierName('couriername')
                            ->setTitle('couriername');
             $shipment->addTrack($track);
             Mage::helper('shipmenty')->addShipmentComment(
                        $shipment,
                        $this->__('%s addeddd tracking ID %s', $vendor->getVendorName(), $awbNumbercouriername)



                    );

        $session->addSuccess($this->__('Tracking ID has been added. Please take three printouts of each manifest and keep one copy of airway bill signed by courier boy with you as proof of pick up.  '));
        $highlight['tracking'] = true;
        $customerMessage = 'Your order has been shipped. Tracking Details.Shipment#: '.$_shipmentId.' , Track Number: '.$awbNumberFedex.'Courier Partner : www.fedex.com - Craftsvilla.com (Customercare email: customercare@craftsvilla.com)';
        $_customerSmsUrl = $_smsServerUrl."username=".$_smsUserName."&password=".$_smsPassowrd."&type=0&dlr=0&destination=".$customerTelephone."&source=".$_smsSource."&message=".urlencode($customerMessage);
        $parse_url = file($_customerSmsUrl);
        $shipment->save();



    }
  • 写回答

2条回答 默认 最新

  • dragon7713 2015-05-13 05:55
    关注

    Use the require() command within your function and it should do the trick.

    require('/var/www/html/demo/courier/test.php');
    
    评论

报告相同问题?

悬赏问题

  • ¥15 基于FOC驱动器,如何实现卡丁车下坡无阻力的遛坡的效果
  • ¥15 IAR程序莫名变量多重定义
  • ¥15 (标签-UDP|关键词-client)
  • ¥15 关于库卡officelite无法与虚拟机通讯的问题
  • ¥100 已有python代码,要求做成可执行程序,程序设计内容不多
  • ¥15 目标检测项目无法读取视频
  • ¥15 GEO datasets中基因芯片数据仅仅提供了normalized signal如何进行差异分析
  • ¥100 求采集电商背景音乐的方法
  • ¥15 数学建模竞赛求指导帮助
  • ¥15 STM32控制MAX7219问题求解答