SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2001
    Location
    Russia
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    echo( date("l, F dS Y.") ); does not work

    I'm trying to open a PHP page which looks like this:

    <HTML>
    <HEAD>
    <TITLE>Today's Date</TITLE>
    </HEAD>
    <BODY>
    <P>Today's Date (according to this Web server) is
    <?php

    echo( date("l, F dS Y.") );

    ?>
    </BODY>
    </HTML>

    But instead of currunt date it shows me the folowing:
    -----------------------------------------------
    Today's Date (according to this Web server) is
    -----------------------------------------------

    What should I do to display it correctly ?
    Regards,
    Alexander Saprykin
    http://www16.brinkster.com/saprykin

  2. #2
    imagine no limitations exbabylon's Avatar
    Join Date
    Dec 2000
    Location
    Idaho, USA
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not quite sure because I hardly ever use date functions, but try:

    PHP Code:
    echo "Today's date, according to the server, is"date(l"F dS Y") . ""
    Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.

    Exbabylon- Professional Internet Services

  3. #3
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How are you opening it? Are you doing a file> open in INternet Explorer? If so you need to access through HTTP?

    Prerequisites:
    You have a web server running?
    You have php installed on that web server?
    Access the page through the browser like http://localhost/yourpage.php(if you have a web server running locally on your comp)
    http://www.yourdomain.com/page.php(if your site is hosted remotely)
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  4. #4
    ********* Addict
    Join Date
    Apr 2000
    Location
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try creating a new file and inserting <?php phpinfo(); ?> in it. If the result is blank when you access it through a browser the it isn't running. If you see loads of cool information then it is running.

  5. #5
    SitePoint Zealot
    Join Date
    Jun 2001
    Location
    Russia
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi !

    Thanks for all your responses.

    1. I have my web server running (IIS).
    Internet Service Manager says that
    WWW, FTP and Gopher are running.

    2. I have php installed on my computer (version 4).
    But I don't know wheather it is running automaticaly when windows starts.

    3. I'm opening my page like http://stom/today.php
    where "stom" is my computer name.

    4. When I open menu in I.E. View/Source it shows me full .PHP page, including
    <?php and ?> tags

    5. If I open page http://stom/default.htm it works, though.

    6. the code
    echo "Today's date, according to the server, is". date(l, "F dS Y") .
    "";
    does not work, too.

    PLEASE help me
    Regards,
    Alexander Saprykin
    http://www16.brinkster.com/saprykin

  6. #6
    SitePoint Zealot
    Join Date
    Jun 2001
    Location
    Russia
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah !!!
    I see blank page test.php

    <HTML>
    <HEAD>
    <TITLE>Today's Date</TITLE>
    </HEAD>
    <BODY>

    <?php phpinfo(); ?>

    </BODY>
    </HTML>

    Where am I wrong ?
    Regards,
    Alexander Saprykin
    http://www16.brinkster.com/saprykin

  7. #7
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'll probably need to set upp IIS to parse php pages. Heres what you do.

    Step 1 Open IIS Manager
    Step 2 Right Click on Default Web Site
    Step 3 Click the Home Directory Tab
    Step 4 Click the 'Configuration' button
    Step 5 Click add
    Step 6 Leave everything set to its default and add .php in the extension box and then use the browse button to find the path to the phpisapi.dll in the distro of PHP/sapi folder.

    Step 7 restart IIS.

    Then try it again
    Please don't PM me with questions.
    Use the forums, that is what they are here for.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •