begining - tutorial

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rhXX

    begining - tutorial

    hi,

    i need to begin in php. is there any tutorial to begin? (i started an
    hour ago .....)

    i copied this first example

    <html>
    <head>
    <titleHello World </title>
    </head>
    <body>

    Hello, world!

    <?php

    echo 'This is my first PHP web page.';

    ?>

    </body>
    </html>

    and saved as .html file, and when i open it with the browser, it
    appears only the html part, but not php ....

    tks in advance

  • e_matthes@hotmail.com

    #2
    Re: begining - tutorial

    On Jun 13, 6:28 am, rhXX <rh00...@gmail. comwrote:
    hi,
    >
    i need to begin in php. is there any tutorial to begin? (i started an
    hour ago .....)
    >
    i copied this first example
    >
    <html>
    <head>
    <titleHello World </title>
    </head>
    <body>
    >
    Hello, world!
    >
    <?php
    >
    echo 'This is my first PHP web page.';
    >
    ?>
    >
    </body>
    </html>
    >
    and saved as .html file, and when i open it with the browser, it
    appears only the html part, but not php ....
    >
    tks in advance

    Your local bookstore has an awesome section entitled "Computers -
    Programming". It might go by the sneaky name of "Computing -
    Programming Languages", or something tricky like that.

    Seriously, go down there and pick out any introductory book about
    php. I started with Sam's Teach Yourself PHP. You will run through
    the basics, and then you can ask more interesting questions.

    Comment

    • rhXX

      #3
      Re: begining - tutorial

      On Jun 13, 5:01 pm, e_matt...@hotma il.com wrote:
      On Jun 13, 6:28 am, rhXX <rh00...@gmail. comwrote:
      >
      >
      >
      hi,
      >
      i need to begin in php. is there any tutorial to begin? (i started an
      hour ago .....)
      >
      i copied this first example
      >
      <html>
      <head>
      <titleHello World </title>
      </head>
      <body>
      >
      Hello, world!
      >
      <?php
      >
      echo 'This is my first PHP web page.';
      >
      ?>
      >
      </body>
      </html>
      >
      and saved as .html file, and when i open it with the browser, it
      appears only the html part, but not php ....
      >
      tks in advance
      >
      Your local bookstore has an awesome section entitled "Computers -
      Programming". It might go by the sneaky name of "Computing -
      Programming Languages", or something tricky like that.
      >
      Seriously, go down there and pick out any introductory book about
      php. I started with Sam's Teach Yourself PHP. You will run through
      the basics, and then you can ask more interesting questions.
      :-)))) tks!

      Comment

      • Geoff Berrow

        #4
        Re: begining - tutorial

        Message-ID: <1181744890.903 868.271210@o11g 2000prd.googleg roups.comfrom
        rhXX contained the following:
        >and saved as .html file, and when i open it with the browser, it
        >appears only the html part, but not php ....

        Try saving it as a .php file :-)

        I take it you are uploading it to a server?

        --
        Geoff Berrow (put thecat out to email)
        It's only Usenet, no one dies.
        My opinions, not the committee's, mine.
        Simple RFDs http://www.ckdog.co.uk/rfdmaker/

        Comment

        • Erwin Moller

          #5
          Re: begining - tutorial

          rhXX wrote:
          hi,
          >
          i need to begin in php. is there any tutorial to begin? (i started an
          hour ago .....)
          >
          i copied this first example
          >
          <html>
          <head>
          <titleHello World </title>
          </head>
          <body>
          >
          Hello, world!
          >
          <?php
          >
          echo 'This is my first PHP web page.';
          >
          ?>
          >
          </body>
          </html>
          >
          and saved as .html file, and when i open it with the browser, it
          appears only the html part, but not php ....
          Not entirely true.
          Check the source of the html page, and you find the php-part in there just
          fine. It only didn't execute. :)

          The problem with your approach is that you need PHP to actually run.
          Just throwing it into a browser as a html-file will not do.
          You need PHP installed on a server (can be your own machine), and tell your
          webserver (Apache/IIS/whatever) that it should use PHP for all requests
          that end with .php (.html is NOT a smart idea).

          That asside, I tink e_matthes gave you a better answer: Just get a good
          book.
          I prefer books from O'Reilly, but that is a matter of taste.

          Regards,
          Erwin Moller
          >
          tks in advance

          Comment

          • rhXX

            #6
            Re: begining - tutorial

            Try saving it as a .php file :-)
            I take it you are uploading it to a server?

            --
            Geoff Berrow (put thecat out to email)

            Check the source of the html page, and you find the php-part in there just
            fine. It only didn't execute. :)
            EXACTLY
            The problem with your approach is that you need PHP to actually run.
            Just throwing it into a browser as a html-file will not do.
            You need PHP installed on a server (can be your own machine), and tell your
            webserver (Apache/IIS/whatever) that it should use PHP for all requests
            that end with .php (.html is NOT a smart idea).
            >
            That asside, I tink e_matthes gave you a better answer: Just get a good
            book.
            I prefer books from O'Reilly, but that is a matter of taste.
            >
            Regards,
            Erwin Moller
            ok, perfect! it worked fine with .php
            the tutorial i found, talked about php code inside html code, only,
            without precising where it is processed! i thinked that is processing
            in the browser .... now seeing both sources i understood the
            difference!

            sincerely, tks a lot!!!!!!!!!


            Comment

            • Virginner

              #7
              Re: begining - tutorial

              "rhXX" <rh00667@gmail. comwrote in message
              news:1181744890 .903868.271210@ o11g2000prd.goo glegroups.com.. .
              hi,
              >
              i need to begin in php. is there any tutorial to begin? (i started an
              hour ago .....)
              W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.


              D.
              --
              googlegroups /dev/nul


              Comment

              • rhXX

                #8
                Re: begining - tutorial

                http://www.w3schools.com/php
                D.
                googlegroups /dev/nul
                tks!!!

                Comment

                • Lars Eighner

                  #9
                  Re: begining - tutorial

                  In our last episode,
                  <1181744890.903 868.271210@o11g 2000prd.googleg roups.com>, the lovely and
                  talented rhXX broadcast on comp.lang.php:
                  hi,
                  i need to begin in php. is there any tutorial to begin? (i started an
                  hour ago .....)
                  i copied this first example
                  ><html>
                  ><head>
                  ><titleHello World </title>
                  ></head>
                  ><body>
                  Hello, world!
                  ><?php
                  echo 'This is my first PHP web page.';
                  ?>
                  ></body>
                  ></html>
                  and saved as .html file, and when i open it with the browser, it
                  appears only the html part, but not php ....
                  tks in advance
                  Browsers should ignore stuff in angle brackets that cannot be identified as
                  HTML elements. And php is not HTML. PHP is a preprocessor language (among
                  other things). See: "pre" + "processor. " Something has to process it. That
                  something can be a web SERVER (not a browser) if the server has a php module
                  and is properly configured. Or it can be php at the command line. You
                  don't really have an .html document. It is a .php document. It is the
                  processing that changes it into html that can be rendered by browsers. I am
                  pretty sure some browsers can be configured to use php (if it is installed)
                  to preprocess a document before it renders it, but that will often require a
                  dummy server environment and the browser will have to know the document is
                  supposed to be php, which it won't when it views the document as a file and
                  the extension is not .php.

                  1) Have you installed php on your system?
                  2) Do you have a web server with a php module?

                  If the answer is no to both questions, then you are not in the php business.
                  If 1) is yes, I suggest you start reading the documentation that came with
                  it.

                  If you just want to see what is in the document, use view source in your
                  browser.

                  --
                  Lars Eighner <http://larseighner.com/ <http://myspace.com/larseighner>
                  Countdown: 586 days to go.
                  Why "War Czar"? That sounds like Imperial Russia!
                  Call it by the American term: "Fall Guy."

                  Comment

                  Working...