Jump to content

Global Vars


josh6025

Recommended Posts

I'm creating a functions file for one of my scripts and I'm having a problem with allowing my global var to interact with the function. Here's what I have for my function;

 

function connect($act)
{
global $var1, $var2;
return mycode
}

 

When I'm using it as a stand alone page it works fine, just not if I use it within WHMCS.

Link to comment
Share on other sites

For one of my scripts I'm making a functions.php page and on that page I'm including a config.php file. So what I need to do is include the global vars into the function, but when I try include them they are not being passed into the function.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated