Help with error on inclusion

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
cknouse
Forum Newbie
Posts: 2
Joined: Wed Oct 23, 2002 11:09 am

Help with error on inclusion

Post 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
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

On some web servers you cannot use absolute path with include or require.
Post Reply