CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2007
    Posts
    119

    Question A Question about PHP

    I created a test.php file in my inetpub folder and wrote the following script in that file, but when I access that page by url "http://localhost/test.php" it prompts me the error "The page cannot be found ", can anyone please guide what am I doing wrong.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title>My First PHP Page</title>
    </head>
    <body>
    <h1>My First PHP Page</h1>
    <?php

    echo '<p>This is my first PHP script.</p>';

    ?>
    </body>
    </html>


    Thanks and Best Regards,
    Mushq

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: A Question about PHP

    Simple answer is that you have something configured wrong. I am assuming you are using IIS since you mentioned the inetpub folder. Another assumption would be that no HTML or PHP file can be found in your localhost. Am I correct?
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Aug 2002
    Posts
    879

    Re: A Question about PHP

    As PeejAvery already mentioned it looks like a configuration problem.
    Give us some more information about your installation (iis version, php version aso.) and configuration.

    And check-out this

    http://wiki.phpgedview.net/en/index...._PHP_and_MySQL
    http://hostlibrary.com/ConfiguringPH...erver2003.html

  4. #4
    Join Date
    Jun 2004
    Posts
    142

    Re: A Question about PHP

    Quote Originally Posted by Mushq
    I created a test.php file in my inetpub folder and wrote the following script in that file, but when I access that page by url "http://localhost/test.php" it prompts me the error "The page cannot be found ", can anyone please guide what am I doing wrong.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title>My First PHP Page</title>
    </head>
    <body>
    <h1>My First PHP Page</h1>
    <?php

    echo '<p>This is my first PHP script.</p>';

    ?>
    </body>
    </html>


    Thanks and Best Regards,
    Mushq
    make sure your page is in "\Inetpub\wwwroot" folder and not in "Inetpub" folder

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured