On Sun, 20 Jun 2004 23:55:22 -0700
"Bill M." <beelymagee.TakeThisOut@cox.net> wrote:
Here's some php code to see output. I'm using php 4.3.3 (from a php,
MySQL, Apache book CD.) I have Apache2 (not sure what sub-version it
is) and it's started via "apachectl start" I'm getting odd output from
this(see below):
<html>
<head>
<title>Testing INCLUDE command</title>
</head>
<body>
<p> Here's some text to show that this PHP file is working ...</p>
<?php
echo "<BR />";
echo "<BR />";
echo "<h1>Here is some other text ECHOed from the PHP command
file</h1>";
if (file_exists("navMenus.php")) {
echo "<h3>The Navigation Menus file exists according to
PHP!</h3>"; }
if (is_readable("navMenus.php")) {
echo "<h3>An the Navigation Menus file is READable to
boot!</h3>"; }
?>
<? include("navMenus.php"); ?>
</body>
</html>
Here's the output (in Opera 7.51 Linux) from the above:
Here's some text to show that this PHP file is working ...
"; echo "
"; echo "
Here is some other text ECHOed from the PHP command file
if (file_exists("navMenus.php")) { echo "
The Navigation Menus file exists according to PHP!
"; } if (is_readable("navMenus.php")) { echo "
An the Navigation Menus file is READable to boot!
"; } ?>
I still don't get any output from the navMenus.php file - PHP sez the
file exists and is readable.
I changed the above ECHO commands to PRINT in the hope that it would
remove the "; echo " gibberish - no change. The HTML headers(<h1, h3>)
came out formatted as expected. I saw mention of the READFILE()
command (thanks, Mathias!) - I may play with that to see if that is a
better solution.
-*-Bill
--
Windows has detected that your mouse has moved,
please wait while Windows reboots for your changes to take effect.<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: Including Files--PHP or Perl?