#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    2
    Rep Power
    0
    HI

    I am very new to php. So i am trying the following example. when i run from my unix promp (php a.php) it produces out put. But when call the same from web browser it does not produce any out put.
    help is greatly appriciated.
    code:

    <?php

    print "<html>";
    print "<body>";
    print "Hello, world.";
    print "</body>";
    print "</html>";

    ?>

    Thanks
    Sreekanth.G
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    20
    Rep Power
    0
    I am note sure if php has a print function. I do know that it has a C like printf functions. So if converted your lines to look like

    printf("<html>");

    they would work.

    Later
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    60
    Rep Power
    15
    PHP isn't set up correctly on your machine. make a file that only consists of...

    <? PHPINFO() ?>

    ...and name something clever, like phpinfo.php4 (or .php3, php, whatever) and hit it through your server. If it doesn't work, you can start poking through your httpd.conf, php.ini, etc. files.

    I think I had this problem before, and I believe the problem was in httpd.conf not pointed to php correctly.

Similar Threads

  1. pb with XSLT that produce Javascript
    By Merkava in forum JavaScript Development
    Replies: 1
    Last Post: February 12th, 2004, 10:15 AM
  2. pb with XSLT that produce JavaScript
    By Merkava in forum JavaScript Development
    Replies: 0
    Last Post: February 11th, 2004, 07:09 PM
  3. legal to put USPS tracking on website?
    By tommy916 in forum HTML Programming
    Replies: 0
    Last Post: February 10th, 2004, 07:08 PM
  4. How to put my own codes in Visual C++?
    By MelaOS in forum C Programming
    Replies: 1
    Last Post: January 28th, 2004, 07:36 AM
  5. How Can I put links on an image??
    By donnwar in forum Photoshop Help
    Replies: 9
    Last Post: December 23rd, 2003, 01:12 AM

IMN logo majestic logo threadwatch logo seochat tools logo