2015-09-09 77 views
1

我想獲得SiteUrl in prestashop自定義模塊。我可以如何實現這一目標?如何獲得prestashop模塊中的Siteurl?

這裏是我的代碼:

if(!empty($member_id)) { 
     //set POST variables 
     $url = **Here i want my site url**; 
     $fields = array(
        'first_name' => urlencode($FirstName), 
        'last_name' => urlencode($LastName), 
        'username' => urlencode($userName), 
        'email' => urlencode($customerEmail), 
        'membership_id' => urlencode($member_id), 
        'password' => urlencode("[email protected]"), 
        'password2' => urlencode("[email protected]") 
       ); 

    } 

回答

0

嘗試 __PS_BASE_URI__ =>網站URL

或者 __PS_BASE_DIR__ =>網站絕對路徑

問候,

+0

沒能得到路徑像這個:http://www.example.com – user1990

+0

With _ _ PS_BASE_URI _ _ in php OR _PS_BASE_ DIR在smarty? – ethercreation