Page 1 of 1

Help with error on inclusion

Posted: Wed Oct 23, 2002 4:51 pm
by cknouse
Ok, I figured out my embed problem. Missing the include for the header ( Imadumbass ) now I have another problem.

I get this error message:

Warning: Failed opening '' for inclusion (include_path='.:/usr/local/lib/php') in /home/camelotarena/html/modules/Ldr/index.php on line 41\


when i have this line of code of in

include("$config

Code: Select all

");
}


Now that same line of code is located elsewhere in the script  but if i remove the first instance of it I dont get the above error message.  I get just a blank page.


My other problem is I have a links.php written with this code:

tr>
		<td align="center"><a class="tablelinks" href="/index.php"><font face="Verdana" size="2">Standings</font></a></td>
		<td align="center"><a class="tablelinks" href="/index.php"><font face="Verdana" size="2">Signup</font></a></td>
		<td align="center"><a class="tablelinks" href="/login.php"><font face="Verdana" size="2">Login/Report</font></a></td>

	
		<td align="center"><a class="tablelinks" href="/search.php?search="><font face="Verdana" size="2">Search</font></a></td>
		<td align="center"><a class="tablelinks" href="/match.php?match="><font face="Verdana" size="2">Match DB</font></a></td>
		<td align="center"><a class="tablelinks" href="/admin.php"><font face="Verdana" size="2">Admin</font></a></td>
	</tr>

Now I set the links to this to point them to the embedded format:

<a href=\"modules.php?name=$module_name&file=signup.php><font face="Verdana" size="2">Signup</font></a></td>

but it's not directing it to the embedded format it fails out with a apge not found in the parent window.


Any help woulb be greatly appreciated

Posted: Thu Oct 24, 2002 2:03 am
by twigletmac
Where does it get the $config['html'] info from? It looks like that variable is empty so when PHP tries to include what's in it there's nothing to include.

As for the other problem - is all that code within a PHP code block ? It doesn't look like it is, maybe try something like:

Code: Select all

echo '&lt;a href="modules.php?name='.$module_name.'&amp;file=signup.php&gt;&lt;font face="Verdana" size="2"&gt;Signup&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;';
(Check out volka's post at the bottom of this thread too: viewtopic.php?t=3812)

Also make sure that modules.php is in the same folder as the page linking to it else adjust the link.

Mac

Posted: Thu Oct 24, 2002 5:08 am
by Takuma
On some web servers you cannot use absolute path with include or require.