Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PHP Function

Featured Replies

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');

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.

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.