What version of PHP are you using? If it is PHP 7 you may need to select the MySQLi driver rather than the MySQL driver. Best, Amanda Stevens. Ncaught Error:Call to undefined function mysqlpconnect in.CIDBdriver ciautoloader.
The problem, as pointed out in the php error, is on line 7 of the 'chat.php' file:addaction( 'init', icshowchatbar);This line has two problems:. The correct syntax for a valid callback function should be without the parenthesis and wrapped in single quotes. Since the function is declared inside a php class, it won't be accesible to addaction unless we pass the class instance itself as an argument.
Since the function is not static, we can use $this to pass the current instance.Thus, the correct syntax in this case would be:addaction( 'init', array( $this, 'icshowchatbar' ) );I recommend visiting the code reference for and also reading the user contributed notes at the bottom, where several examples of how to work with actions when using a class can be found.
Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |