Jump to content

Shifting PHP Error...


Warptweet

Recommended Posts

www.warptweet.com/ultimate

 

I'm working on my module system.

On my admin panel, I can edit the modules added to each web page.

 

At first, it started our as adding navigation.php as a module.

when I added ping.php to the list of modules to include, it started giving me errors for the navigation.php which before adding ping.php to include, had no errors.

 

I tried switching ping.php to the top of the list of modules to execute, and navigation.php to the bottom of the modules to execute. Instead of navigation.php getting the error, it's not ping.php which has a problem of being executed. So whatever module is at the top, it gives me an error.

 

You can clearly see the error at the side bar on each page at www.warptweet.com/ultimate

This is what modules2.php looks like:

 

<?php

$modules = file_get_contents("modules/parts/modules2.txt");
$modules2 = $modules;

$modules2 = explode("\n", $modules2);
$count = count($modules2);
$first = 0;

while($count > 0){

include("modules/$modules2[$first]");
$count -= 1;
$first += 1;

}

?>

 

And BTW, modules2.txt looks like this:

 

navigation.php

ping.php

or

ping.php

navigation.php

Depending on which order I include ping.php and navigation.php.

 

Feel free to experiment with my admin panel to gain a better understand, I can easily copy and paste the links again, as long as you do not add a second module to the "Modules 1" which is the first textbox on the Module Editor page, as that will cause the navigation to create massive problems, making it impossible for you to navigate the website anymore.

 

I'd appreciate any help on why it has a problem including ping.php/navigation.php depending on the order.

 

Just ask if I missed explaining something, as this is a rather complicated mixture of files (given it's a module system), sorry if I did.

Link to comment
https://forums.phpfreaks.com/topic/72713-shifting-php-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.