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
evilmonkey
Forum Regular
Posts: 823 Joined: Sun Oct 06, 2002 1:24 pm
Location: Toronto, Canada
Post
by evilmonkey » Tue Mar 14, 2006 7:17 pm
Weirdest error I have EVER seen: I have a very small page with some PHP and some HTML. Very straighforward, here it is:
Code: Select all
<?php
include("functions.php");
include("user_class.php");
$user = new User($_GET['id']); //id passed
$about_self = smilie($user->about_self);
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #cccccc;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
line-height: 16px;
}
-->
</style></head>
<body>
<table width="342" height="18" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top"> <span class="style1"><?php echo $about_self; ?></p></td>
</tr>
</table>
</body>
</html>
And this is the error it spits out:
Code: Select all
Fatal error: Call to undefined function: phpinclude() in /home/vlad/public_html/aboutme.php on line 1
Any ideas on what can be causing it?
Thanks.
Last edited by
evilmonkey on Sat Mar 18, 2006 2:49 pm, edited 1 time in total.
hawleyjr
BeerMod
Posts: 2170 Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA
Post
by hawleyjr » Tue Mar 14, 2006 7:25 pm
For somereason php is trying to call:
add a couple spaces before your include:
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Tue Mar 14, 2006 7:30 pm
might be a binary character that's screwing with php after <?php
evilmonkey
Forum Regular
Posts: 823 Joined: Sun Oct 06, 2002 1:24 pm
Location: Toronto, Canada
Post
by evilmonkey » Tue Mar 14, 2006 8:01 pm
Hmmm....I added a few spaces after <?php, now ther's no output....
nickman013
Forum Regular
Posts: 764 Joined: Sun Aug 14, 2005 12:02 am
Location: Long Island, New York
Post
by nickman013 » Tue Mar 14, 2006 9:09 pm
is there anything before?
check for hidden characters in notepad.
d3ad1ysp0rk
Forum Donator
Posts: 1661 Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA
Post
by d3ad1ysp0rk » Tue Mar 14, 2006 9:12 pm
I'd suggest creating a NEW file with the following in it, and then overwriting the previous file.
Code: Select all
<?php
include("functions.php");
include("user_class.php");
$user = new User($_GET['id']); //id passed
$about_self = smilie($user->about_self);
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #cccccc;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
line-height: 16px;
}
-->
</style></head>
<body>
<table width="342" height="18" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top"> <span class="style1"><?php echo $about_self; ?></p></td>
</tr>
</table>
</body>
</html>
sp2hari
Forum Newbie
Posts: 14 Joined: Fri Jan 13, 2006 3:54 am
Post
by sp2hari » Wed Mar 15, 2006 3:34 am
try having include in this way
i.e remove the () in the include
i am not sure whether this will work but it is worth trying
evilmonkey
Forum Regular
Posts: 823 Joined: Sun Oct 06, 2002 1:24 pm
Location: Toronto, Canada
Post
by evilmonkey » Sat Mar 18, 2006 2:44 pm
Hello,
Sorry, I've been away for a couple of days. I solved the problem by creating a new file, as d3ad1ysp0rk said...really weird stuff though...
Thanks everyone.