January 16, 201115 yr Hello, How come this is happening: Error: Fatal error: Call to a member function mss() on a non-object in C:\xampp\htdocs\forum\index.php on line 27 Security: class security { //SQL Protection public function mss($input) { global $connect; return mysqli_real_escape_string($connect, $input); } //HTML Entities UTF-8 public function entities($input) { return htmlentities($input, ENT_QUOTES, 'UTF-8'); } } $security=new security(); The script below the security class: function open() { } function close() {} function read() {} function write() { global $security; $id = $security->mss($id); } function destroy() {} function clean() {} session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'clean');
January 16, 201115 yr You have posted about this before As of PHP 5.0.5 the write and close handlers are called after object destruction and therefore cannot use objects or throw exceptions. The object destructors can however use sessions.
January 16, 201115 yr as spoken over skype shaun asked me to post here. by using Static functions the problem was solved giving access via security::mss()
Create an account or sign in to comment