sponsored links

Collapse

Announcement

Collapse
No announcement yet.

Simple PHP

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Simple PHP

    So what do I need to do just to test out running PHP on my iseries? I would like to maybe just read a file, grab that data and display something. Just to kind of see how it all works etc.
    Anyone got a quick piece of code and how to use it on the iseries?
    Thanks

  • #2
    I recommend Chris Ringer's articles on itjungle.com. You can start with this one:

    https://www.itjungle.com/2016/02/23/fhg022316-story01/



    Comment


    • #3
      I saw that one and has nothing to do with displaying my data I don't think.. Just a simple read and display

      Comment


      • #4
        So what do I need to do just to test out running PHP on my iseries?
        That Chris Ringer article should do that. It will test if you can get PHP running on your system. But then you go farther:

        I would like to maybe just read a file, grab that data and display something.
        In that, you're starting to ask (apparently) about using SQL in PHP to access relational database rows for display by PHP. (Or you might be asking about reading/displaying streamfile data; it's not quite clear.) A Google search for { php sql db2 } brings up many results. PHP tutorials with many, many examples are all over the internet.
        Tom

        There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

        Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

        Comment


        • #5
          Does this article help? The code is included too. PHP calls RPG stored proc, reads result set, displays in HTML table.

          Ringer
          If you read my two previous PHP articles, you may be tempted to make the leap to use PHP on your IBM i. But you may also have reservations because how in the world will you technically support those apps post implementation? This article discusses the path a PHP request takes as it travels through

          Comment


          • #6
            Or just go to php.net. Those db2 examples are very simple.


            Ringer

            Comment


            • #7
              Originally posted by CaptainRon View Post
              So what do I need to do just to test out running PHP on my iseries? I would like to maybe just read a file, grab that data and display something. Just to kind of see how it all works etc.
              Anyone got a quick piece of code and how to use it on the iseries?
              Thanks
              When you instal Zend Server it installs a number of samples which include DB access.

              I also wrote a multi-part series for iProDeveloper which includes full subfile-type examples. Here's the links:

              Part 1: http://www.iprodeveloper.com/article...e-basics-64331
              Part 2: http://www.iprodeveloper.com/article...unctions-64526
              Part 3: http://www.iprodeveloper.com/article...unctions-64684
              Part 4: http://www.iprodeveloper.com/article...otpourri-64863
              Part 5: http://www.iprodeveloper.com/article...e-access-65023
              Part 6: http://www.iprodeveloper.com/article...ose-ends-65253

              Part 5 covers the data access.

              If you really want to see what can be done really quickly and cheaply then take a look at phpgrid.com - that is one amazing tool and the price is so low it looks like a monthly fee - but it is not. Richard (the primary author) has also worked with Zend to make sure that there is a version that works with the native DB2 access method and it works really well. I wrote about the tool a while ago here http://www.ibmsystemsmag.com/ibmi/de...on/grid_tools/ SInce that time the tool has just got better and better with each release.
              Last edited by JonBoy; April 3rd, 2017, 03:55 PM.

              Comment

              sponsored links

              Collapse

              Working...
              X