The script works well when ran on its own. But I have been trying to simply copy and paste the entire main.php into my own php file as a function to be called from my main. When I test this function I get "Fatal error: Call to a member function addActiveGuest() on a non-object in C:\wamp\www\include\classes\session.php on line 60". Any idea why?
Turning main.php into a function
KillinSprE- Number of posts : 2
Registration date : 2013-09-23
- Post n°1
Turning main.php into a function
KillinSprE- Number of posts : 2
Registration date : 2013-09-23
- Post n°2
Re: Turning main.php into a function
Maybe I wasn't clear enough. With the database installed and all scripts unmodified it works great. But if I try to turn main.php into a function with
- Code:
<?php
function login() {
// main.php in its entirety unmodified
}
login()
|
|