Encoding Question

I am trying out IonCube encoding right, this is for encoding one or two files not the whole things – and I was wondering…

Lets say I encode required.php
and this file has variables that are used throughout the system, it doesn’t seem to work if I do that.

So when you encode something, should it be kind of a stand-alone thing, maybe with only two files where you don’t use the variables as normal?

At some point it seems you want to be able to call some of the encoded parts from the non-encoded pages, but if it changes all the names of variables how would you call it?

If you just include the encoded required.php from a main.php couldn’t someone just change that name in the main.php and get around it?