[Help] php codes can't be rendered well.
Posted: Thu Mar 11, 2004 6:14 pm
I am using linux+apache+php+mysql solution now(I've never used it before).
the problems are:
(1) If I use <?php .......?> style, it works.
But if I use <? ...... ?>, apache cannot interpret the codes, and only render all the codes directly into my browser.
(2) I've set the value of DocumentRoot in httpd.conf, but when I use the following codes to display the value of $DOCUMENTROOT, I can see nothing:
<?php print $DOCUMENTROOT; ?>
so the following codes don't work either:
<?php include ($DOCUMENTROOT."/files/header.inc"); ?>
I've tried a long time, anyone who can help me, I will appreciate it very much.
Thanks a million!
the problems are:
(1) If I use <?php .......?> style, it works.
But if I use <? ...... ?>, apache cannot interpret the codes, and only render all the codes directly into my browser.
(2) I've set the value of DocumentRoot in httpd.conf, but when I use the following codes to display the value of $DOCUMENTROOT, I can see nothing:
<?php print $DOCUMENTROOT; ?>
so the following codes don't work either:
<?php include ($DOCUMENTROOT."/files/header.inc"); ?>
I've tried a long time, anyone who can help me, I will appreciate it very much.
Thanks a million!