Fork me on GitHub

#1 2015-08-20 07:51:40

Wolfy
Member
Registered: 2015-05-12
Posts: 313

what is "global $ check num"?

What does     "global $checknum;" do?  When does it need to be called in an app?  Can it be called more than once?

I have another app doing weird things, or 32bit Opera is doing weird things with another app.  I can't even fully explain this one yet, but the same code is acting completely differently on the localhost than it is live.  Until I started messing with that statement, localhost and live both acted the same and had the same 2 bugs. I copied that command to the run function (also leaving it at the original location in the open function), and now both of the bugs are fixed locally, but the live site is mostly worse off. This is using the same code, so that checknum statement must do something pretty important.


Wolfy
https://www.facebook.com/groups/oneye/
Currently accepting new users...  http://www.OS1.hawkwolf.net
onEye admins: OS1 is a beta testing hotbed. Non-core apps available upon request.

Offline

#2 2015-08-28 12:23:12

lars-sh
Administrator
From: near Hamburg, Germany
Registered: 2011-07-14
Posts: 731
Website

Re: what is "global $ check num"?

Whenever you use the checknum variable inside of a function or method (ergo outside of the global scope), you need to add that line to the function or method to tell PHP: "Hey, I'll use the variable checknum, it's a global one."


Best regards,
Lars Knickrehm

The oneye project.

Offline

Board footer

Powered by FluxBB