A php script is a file containing PHP code.
2 php scripts can be involved in the answer of a single HTTP query. In that case, the two script can exchange data using function parameters.
But in your case, i have the feeling that your two scripts are meant to react to 2 differents HTTP stimuli. In that case they belong to a different execution line. Variables in PHP does not exist outside of their execution line context, which mean that even a single PHP script cannot share one of its variable with a second call to itself.
When manipulating strings or numbers, it is possible to store the variables in a *global* scope such as sessions, but in your case, the ftp connection is a resource and a resource is not serializable and can't therefore be passed from one execution line to the other
good luck with your project
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --