![]() |
Error on page
Can anyone tell me why I get an error on a php page when I move it out of the bbs directory and into a chat directory and add the chdir line of code? I get the error:
Line 43 Char 1 Object Expected I will paste the code below. Thanks Jaime PHP Code:
|
Your problem is how you're setting the navbits. $parent isn't defined... You should do this instead...
Code:
<?php |
I put chat.php where you said and still get an error, but on line 47 now. I only have 45 lines of code in that file, could the error be in my template? I don't understand this, all the code works fine when I have this file in the bbs directory, but I get an error when I move it out of the bbs directory into my chat directory. Will post my code below.
PHP Code:
|
What's your new error message?
|
I was editing my template tonight and now the line of the error has changed. The error is now this:
Line 22 Char 1 Object Expected Could the error be in my template? Could there be something wrong with the way I'm changing directories in my php file? I'm wondering that cause everything works fine when the php file is in my bbs directory where my global.php file is. Thanks Jaime |
Well, changing the working directory generally only messes up other includes... I don't see anything in your code that would cause that problem. If you think it's a problem, you can try this:
Code:
<?php |
I changed NO_REGISTER_GLOBALS to false and that didn't change anything. I also added the code in red that you added to my code and I still get the same error message.
Any other suggestions? Thanks Jaime |
Can you post your Chat template?
|
Thats a template error and not an error from the php file.
Its usually from using coding thats not up to standards. Try to run the template through a validator. |
Templates cannot be placed directly into the W3C validator - as it contains vBulletin's custom tags.
|
All times are GMT. The time now is 08:15 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|