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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to get folder-path during cPAddon development?

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

  1. gigapros

    gigapros Member

    Mar 10, 2008
    Likes Received:
    Trophy Points:
    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:

    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.

Share This Page