Hi
I'm new to PHP. I installes wamp2. and wrote a sample code

<HTML><BODY>
<? echo date("M-d-Y"); ?>
</BODY></HTML>

saved it in www folder. but now wen i click the saved file (hello.php)

the file opens but nothing is getting display

pls help me

Divya

hi divya..
do u run from wamp server.
eg:

http://localhost/foldername/aaa.php

use <?php echo date("Y-m-d"); ?>..because some times <? is not accepting based on wamp.


and also u should open new folder in www ....in that folder only u place ur file..
sry 4 language inconvinience...

Hi
I'm new to PHP. I installes wamp2. and wrote a sample code

<HTML><BODY>
<? echo date("M-d-Y"); ?>
</BODY></HTML>

saved it in www folder. but now wen i click the saved file (hello.php)

the file opens but nothing is getting display

pls help me

Divya

hi sarika

thanx for the reply ..but i tried to open it as u said. i mean run from the wamp server. i placed it in a folder named 'sample ' and added the

<?php ............?>

. it has the Icon of mozilla firefox. still its not opening

Sorry...i miss spelt ur name...

Saritha...... :-)

no probs..


try this..

<HTML><BODY>
<?php echo date("[B]m[/B]-d-Y"); ?>
</BODY></HTML>

ur mistake is use M..

oh!! sorry.....i cant start the wamp server i thnk thats the prob

trying to start it ....but it says that cant start wamp in host computer

no probs..


try this..

<HTML><BODY>
<?php echo date("[B]m[/B]-d-Y"); ?>
</BODY></HTML>

ur mistake is use M..

first make sure apache and php are running perfectly on your machine. Try echo phpinfo() if you'll see the result

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.