Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP not displaying 1

Status
Not open for further replies.

frozenpeas

Technical User
Sep 13, 2001
893
CA
Can anyone see what I'm doing wrong here?

The output of phpinfo() shows up fine.

Here is my little bit of code:

Code:
<?
require_once('/fns/connect.php');
require_once('/fns/output.php');
do_html_header('Welcome');
?>
<form action=&quot;/test2.php&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot; name=&quot;form&quot; id=&quot;form&quot;>
  <table width=&quot;25%&quot; border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;3&quot; cellspacing=&quot;0&quot;>
    <tr> 
      <td width=&quot;16%&quot; class=&quot;bodyContent&quot;>Username:</td>
      <td width=&quot;84%&quot;><input name=&quot;username&quot; type=&quot;text&quot; id=&quot;username&quot; size=&quot;25&quot; maxlength=&quot;50&quot;></td>
    </tr>
    <tr> 
      <td class=&quot;bodyContent&quot;>Password:</td>
      <td><input name=&quot;password&quot; type=&quot;password&quot; id=&quot;password&quot; size=&quot;25&quot; maxlength=&quot;50&quot;></td>
    </tr>
    <tr> 
      <td> </td>
      <td><input type=&quot;submit&quot; value=&quot;login&quot;></td>
    </tr>
  </table>
</form>
<?
do_html_footer();
?>

This outputs just:

Code:
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;>
<HTML><HEAD>
<META http-equiv=Content-Type content=&quot;text/html; charset=iso-8859-1&quot;></HEAD>
<BODY></BODY></HTML>

Thanks. frozenpeas
 
It isn't needed at this point, so I have taken it out. I actually took out all php and started adding things back in one by one. That is where
Code:
require_once('/fns/output.php');
starting giving me the blank page. I have also tried
Code:
require()
and
Code:
include()
. frozenpeas
 
In output.php, I've put just an echo or a print. Even if output.php contains nothing, I still have the same problem. frozenpeas
 
It shows up when I include output.php. I stopped calling that function, and tried just the include. Even if output.php is blank, I still have the problem. frozenpeas
 
It's got to be something weird in that file. Maybe odd characters or something.

Where did you get the file? I sometimes see web sites that replace the normal space character with another when displaying a file, and that weird character can mess with PHP's output. Want the best answers? Ask the best questions: TANSTAAFL!
 
I wrote the file. I tried putting just an echo in it... I've tried having it completely empty.

frozenpeas
 
I have no blank lines outside the tags. Yes, I have short tags turned on. frozenpeas
 
So the entire interior HTML block is not being output, but only when you include() or require() output.php, whether you invoke the functions in that script or not.

You've stumped the chump. I have no idea what is causing the problem, and I can't duplicate it on my system using the script code you've provided.

Suppose you take the interior HTML and instead of outputting it with a context-switch, you stay in PHP mode and wrap then entire block in an echo '...'.

Does it work then? Want the best answers? Ask the best questions: TANSTAAFL!
 
Works:

Code:
<?
//require_once('/fns/output.php');
print 'Hello';
?>

doesn't work:

Code:
<?
require_once('/fns/output.php');
print 'Hello';
?>
frozenpeas
 
I can't think of anything that is wrong with that code. But let's better-define the problem.

If you use the code from your last post that does not work, but replace output.php with a simpler file, does it work then? Want the best answers? Ask the best questions: TANSTAAFL!
 
Sounds to me like fns/output.php is not being found, and with a require that should stop everything...

what if you try this, put another file called test.php in the same directory as output.php and then change your script to.

Code:
<?
include('/fns/test.php');
print 'Hello';
?>

Contents of test.php...
<?
print &quot;If I see this, skiflyer has no clue of what my problem is<br>\n&quot;;
?>

-Rob
 
No, all that has been generated is a blank page. frozenpeas
 
skiflyer, I tried something like that... no go. frozenpeas
 
no go means what? a blank page, you see help, you see nothing?

Do you perhaps have permissions set on the fns directory such that php can't read the files?

Have you turned your error reporting to ALL yet?

-Rob
 
As I mentioned above, error reporting is set to ALL.

No go means it did not work - I am still having the same problem (blank page).

Permissions are good. frozenpeas
 
Oh right... yeah, that's a weird thing. Just some of the tags were outputted. The function never generated the title tags or the footer (which for the time being echoed 'footer'). frozenpeas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top