Wildhalf Posted August 24, 2006 Share Posted August 24, 2006 Hi,I have a php script. One of the modules is called HtPasswd.class.phpWithin in this module there are2 functions i want to use addUser(email, password) cryptPass(password)What i need to know is how i can call these functions properly from my main php file called register.phpWhen i try either of these,$enc_pass = $Htpasswd->cryptPass($user_password);$this->$enc_pass = $Htpasswd->cryptPass($user_password);I get the following errorFatal error: Call to a member function on a non-objectAnyone out htere know how i can call these functions??thank you Kieron Link to comment https://forums.phpfreaks.com/topic/18585-need-help-calling-functions/ Share on other sites More sharing options...
hitman6003 Posted August 24, 2006 Share Posted August 24, 2006 Make sure the classfile is included, then you should be able to do...[code]$enc_pass = Htpasswd::cryptPass($user_password);[/code]or[code]$htpasswd = new Htpasswd;$htpasswd ->cryptPass($user_password);[/code]Depending on your version of php. Link to comment https://forums.phpfreaks.com/topic/18585-need-help-calling-functions/#findComment-80098 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.