extremely basic question please don't flame

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default extremely basic question please don't flame

    If PHP files have to end in .php to get parsed, and the browser opens
    the index.htm file by default, how can I embed PHP into the index.htm
    file. I know I could just make a link to a .php page, but I'm trying to
    get an embedded counter to funtion on the main page. Any assistance
    would be greatly appreciated. I know this is simple but I'm a newbie and
    couldn't find the answer to a question so basic. Thanks.

    - Joshua
    Joshua James Guest

  2. Similar Questions and Discussions

    1. Extremely basic question, please help
      In Visual Studio 2005 Beta 2 I created a web project with one file default.aspx. I wish to crete control 'Simple' in namespace 'SimpleControls'. I...
    2. Question for this Group ... dont flame me :)
      Hello Jeff, These answers are of course my own experience, but may be significant to understand the bigger picture. I reorder your points a bit...
    3. Looking for easy Fire/Flame behaviour
      Hi, I'm looking for a quick and easy Fire/Flame behaviour. I found onethat's actually quite good (...
    4. Layers-an extremely basic question
      Okay, I'm reading my photoshop elements for Dummies book and I stilll have a question about layers....not a good sign! Are layers used only when...
    5. Extremely Basic mySQL question.
      Hi, I was wondering how should I download the mySQL dump to my computer via FTP? ASCII or binary? Or does it matter? Thanks a lot, Tyler
  3. #2

    Default Re: extremely basic question please don't flame

    "Michael Vilain <vilain@spamcop.net>" wrote:
    > In article <10lbuj8l4nes718@corp.supernews.com>,
    > Joshua James <joshua@tech9.org> wrote:
    >
    >
    >>If PHP files have to end in .php to get parsed, and the browser opens
    >>the index.htm file by default, how can I embed PHP into the index.htm
    >>file. I know I could just make a link to a .php page, but I'm trying to
    >>get an embedded counter to funtion on the main page. Any assistance
    >>would be greatly appreciated. I know this is simple but I'm a newbie and
    >>couldn't find the answer to a question so basic. Thanks.
    >>
    >>- Joshua
    >
    >
    > You can't, AFAIK. If your Apache web server isn't configured to open
    > index.php as well as index.{html,shtml,htm}, then you're out of luck.
    > I'm unfamiliar with other servers, but that's the way Apache works.
    > Also, you could run a "server-side include" to run a perl script to do
    > the counter, but again, your server has to be configured to do these
    > things. I suggest reading the docs on your server's configuration.
    >
    > If you're not the webmaster and can't configure it, you're SOL and will
    > have to be content with CGI. If you don't even have that (like my pages
    > on comcast.net), then find a true web hosting company.
    >
    Thanks, it turns out my hoting service supports index.php. I was under
    the impression that which index to open was up to the browser, and it
    defaulted to index.htm or .html. Apparently this is left up to the
    server. Duh. Oh well, thanks, I was wracking my brain until I got it fixed.

    -Joshua
    Joshua James Guest

  4. #3

    Default Re: extremely basic question please don't flame

    On Sat, 25 Sep 2004 23:42:19 -0400 (more or less), Joshua James
    <joshua@tech9.org> wrote:
    >
    >Thanks, it turns out my hoting service supports index.php. I was under
    >the impression that which index to open was up to the browser, and it
    >defaulted to index.htm or .html. Apparently this is left up to the
    >server. Duh. Oh well, thanks, I was wracking my brain until I got it fixed.
    >
    >-Joshua
    It may be possible to override the default ordering set at the top level of
    the server with an .htaccess file, too.
    Steven Stern Guest

  5. #4

    Default Re: extremely basic question please don't flame

    "Michael Vilain <vilain@spamcop.net>" wrote:
    > In article <10lbuj8l4nes718@corp.supernews.com>,
    > Joshua James <joshua@tech9.org> wrote:
    >
    >
    >>If PHP files have to end in .php to get parsed, and the browser opens
    >>the index.htm file by default, how can I embed PHP into the index.htm
    >>file. I know I could just make a link to a .php page, but I'm trying to
    >>get an embedded counter to funtion on the main page. Any assistance
    >>would be greatly appreciated. I know this is simple but I'm a newbie and
    >>couldn't find the answer to a question so basic. Thanks.
    >>
    >>- Joshua
    >
    >
    > You can't, AFAIK. If your Apache web server isn't configured to open
    > index.php as well as index.{html,shtml,htm}, then you're out of luck.
    > I'm unfamiliar with other servers, but that's the way Apache works.
    > Also, you could run a "server-side include" to run a perl script to do
    > the counter, but again, your server has to be configured to do these
    > things. I suggest reading the docs on your server's configuration.
    >
    > If you're not the webmaster and can't configure it, you're SOL and will
    > have to be content with CGI. If you don't even have that (like my pages
    > on comcast.net), then find a true web hosting company.
    >
    Not at all the default page is supplied by a configuration directive.
    If the server is configured to allow overides or a limit of overides you
    can change this with an .htaccess file.

    A quick test would be to create a text file called .htaccess
    place it in the directory where you want php to run

    The text file should have this line in it


    DirectoryIndex index.php index.html index.htm default.php default.html
    default.htm


    This will allow the following pages to be the default in order of
    preference.


    Jeff Thompson
    Jeff Thompson Guest

  6. #5

    Default Re: extremely basic question please don't flame

    Also, as a last ditch effort you could use a "meta-refresh" to send the user
    to the php page you want to use as the index.

    -Charles

    "Jeff Thompson" <news@ninthwave.us> wrote in message
    news:cj6gob$cq5$1$8302bc10@news.demon.co.uk...
    > "Michael Vilain <vilain@spamcop.net>" wrote:
    > > In article <10lbuj8l4nes718@corp.supernews.com>,
    > > Joshua James <joshua@tech9.org> wrote:
    > >
    > >
    > >>If PHP files have to end in .php to get parsed, and the browser opens
    > >>the index.htm file by default, how can I embed PHP into the index.htm
    > >>file. I know I could just make a link to a .php page, but I'm trying to
    > >>get an embedded counter to funtion on the main page. Any assistance
    > >>would be greatly appreciated. I know this is simple but I'm a newbie and
    > >>couldn't find the answer to a question so basic. Thanks.
    > >>
    > >>- Joshua
    > >
    > >
    > > You can't, AFAIK. If your Apache web server isn't configured to open
    > > index.php as well as index.{html,shtml,htm}, then you're out of luck.
    > > I'm unfamiliar with other servers, but that's the way Apache works.
    > > Also, you could run a "server-side include" to run a perl script to do
    > > the counter, but again, your server has to be configured to do these
    > > things. I suggest reading the docs on your server's configuration.
    > >
    > > If you're not the webmaster and can't configure it, you're SOL and will
    > > have to be content with CGI. If you don't even have that (like my pages
    > > on comcast.net), then find a true web hosting company.
    > >
    > Not at all the default page is supplied by a configuration directive.
    > If the server is configured to allow overides or a limit of overides you
    > can change this with an .htaccess file.
    >
    > A quick test would be to create a text file called .htaccess
    > place it in the directory where you want php to run
    >
    > The text file should have this line in it
    >
    >
    > DirectoryIndex index.php index.html index.htm default.php default.html
    > default.htm
    >
    >
    > This will allow the following pages to be the default in order of
    > preference.
    >
    >
    > Jeff Thompson

    Charles Pelkey Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139