Php include statement doesn't work for me.
Moderator: General Moderators
Php include statement doesn't work for me.
I've an include statement like include ("test.php"), but some how when I tested it it doesn't seem to include the file. Does anyone have any ideas? I'm using php ver. 5.2. Thanks...
- dibyendrah
- Forum Contributor
- Posts: 491
- Joined: Wed Oct 19, 2005 5:14 am
- Location: Nepal
- Contact:
Re: Php include statement doesn't work for me.
Try printing some message in included files.quadoc wrote:I've an include statement like include ("test.php"), but some how when I tested it it doesn't seem to include the file. Does anyone have any ideas? I'm using php ver. 5.2. Thanks...
Like
Code: Select all
test.phpCode: Select all
<?php
print "Test Message...";
?>Code: Select all
file.phpCode: Select all
<?php
include("test.php");
?>Everah | Please use
Everah | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
ok, this is pretty weird! Before the upgrade to 5.2 upgrade, I can mixed match my code with html code like the xample below, but now it's not working any more. I've to echo those html code in order for it to work. Does anyone know why? Thanks...Code: Select all
<?php
if(isset($index) != 1)
{
die("Please contact admin.");
} else {}
?>
<table width="600" border="0" align="center" cellpadding="1" cellspacing="1">
<tr align="left" valign="top">
<td colspan="4">';
<?
if(isset($index) != 1)
{
die("Please contact admin.");
}
?>
</table>Everah | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
astions nailed it for your I believe. That is like the third or fourth short tags related problem posted here in the last two days. Seems to be turning into an epidemic.
If I could ask, what is this little beauty supposed to do:
If I could ask, what is this little beauty supposed to do:
Code: Select all
<?php
if(isset($index) != 1)
{
die("Please contact admin.");
} else {}
?>Code: Select all
works for meCode: Select all
works as well- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA