• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

easy php question/error

Tibiamakers

yourolist.com
Joined
May 24, 2010
Messages
1,377
Reaction score
97
Location
España
i try to put a PHP file in other php using include_once() but it didn't work for me.

guilds.php
PHP:
<?php 





include_once("system/application/config/top5guilds.php"); // this is what I want to put





require_once("system/application/config/create_character.php");
/*Setting global to alllow plugins to access guild list.*/
$GLOBALS['guilds'] = $guilds;
$ide = new IDE;
	try { $ide->loadInjections("guilds_index"); }
	catch(Exception $e) { error($e->getMessage());}

	if(!$ide->isLogged()){alert("You need to be logged in to create guild.");} else {

		echo "<a class='createGuildLink' href='guilds/create'>Create Guild</a>";
	
	}
if(count($config['worlds'] > 1)) {
	echo form_open("guilds", array('method'=>'post'));
	echo "<label>World:</label>";
	echo "<select name='world_id'>";
	foreach($config['worlds'] as $id=>$world) {
		echo "<option value='$id'>$world</option>";
	}
	echo "</select>";
	echo "<input type='submit' value='Sort'>";
	echo "</form>";
}
if(count($guilds) == 0) 
alert("There is no guilds.");
else {

	echo "<table width='100%'>";
	echo "<tr><td width='15%'><center><b>Logo</b></center></td><td><center><b>Name</b></center></td><td width='15%'><center><b>World</b></center></td></tr>";
	foreach($guilds as $guild) {
		$logo = (file_exists("public/guild_logos/".$guild['id'].".gif")) ? "<img src='".WEBSITE."/public/guild_logos/".$guild['id'].".gif' width='64' height='64'>" : "<img src='".WEBSITE."/public/guild_logos/default.gif'>";
		echo "<tr><td width='15%'><center>$logo</center></td><td><center><a href='guilds/view/".$guild['id']."'>".$guild['name']."</a><br><i>".$guild['motd']."</i></center></td><td width='15%'><center>".$config['worlds'][$guild['world_id']]."</center></td></tr>";
	}
	echo "</table>";

}
?>

@edit
it give me this 2 errors errorwebguild.JPG
 
Last edited:
I'm glad you managed to solve it, but you could really not get a much more self-explanatory error. It could not locate the file, thus either the file did not exist, or the file path was incorrect.
 
Back
Top