Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to get folder-path during cPAddon development?

Discussion in 'cPanel Developers' started by gigapros, Dec 8, 2008.

  1. gigapros

    gigapros Member

    Joined:
    Mar 10, 2008
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    51
    I am developing a custom Cpanel addon. The new Cpaddon is working perfectly fine, but I need to make one last change for the config-files, and I need some advice on that...

    On CPanel's cPAddon screen, I have the following standard field:
    Installation URL: http://mydomain.com/my_path/

    QUESTION: How can I extract ONLY "/my_path" portion from the above installation URL? What function should I use in .pm file to do this?

    NOTE: I know that the meta_info "installdir" will return "/home/mydomain/public_html/my_path/". But how exactly can I extract & use the value of "/my_path" into my config files?

    Thanks in advance for help.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice