Page 53 - Open Soource Technologies 304.indd
P. 53

Unit 2: Language Basics



            Miscellaneous Operators                                                               Notes
            The remaining PHP operators are for error suppression, executing an external command, and
            selecting values:
            Error suppression (@)
            Some operators or functions can generate error messages.
            Execution (`...`)
            The backtick operator executes the string contained between the backticks as a shell command
            and returns the output. For example:
                                   $listing = `ls -ls /tmp`; echo $listing;
            Conditional (? :)

            The conditional operator is, depending on the code you look at, either the most overused or most
            underused operator. It is the only ternary (three-operand) operator and is therefore sometimes
            just called the ternary operator.
            The conditional operator evaluates the expression before the ?. If the expression is true, the operator
            returns the value of the expression between the ? and :; otherwise, the operator returns the value
            of the expression after the :. For instance:
                         <a href=”<? = $url?>”><? = $linktext ? $linktext: $url ?></a>
            If text for the link $url is present in the variable $linktext, it is used as the text for the link; otherwise,
            the URL itself is displayed.



                        Apache Software Foundation



                   he Apache Web Server from the Apache Software Foundation. It is a legendary product
                   in many ways. The Internet as we know it now almost certainly would not be here if
             Tit was not for Apache’s web server.
             It is currently, and has been for many years, the number one web server on the Internet
             according to most analytical reports. This is despite the extreme lengths that some rivals have
             gone to try and skew the figures. The widely read monthly survey by Netcraft shows that in
             July 2008, Apache was serving almost 50% of the world’s websites. Apache has been the most
             popular web server on the Internet since April 1996.
             The Apache web server became so popular for several reasons:
               •  Cost: It is Open Source and free.

               •  Cross Platform: Apache runs on almost every mainstream Operating System.
               •  Modular: Plugin modules enable wide support for building interactive and dynamic
                 websites using a multitude of backend services. Highly popular is the combination of the
                 MySQL database and the PHP programming language.
               •  Performance: Consistently Apache has outperformed its rivals in terms of raw page
                 impression performance, efficiency of memory and processor cycle usage and its ability
                 to scale to support many websites within one running server instance.

             Questions:
               1.  Explain the software foundation of Apache.
               2.  What do you mean by PHP programming language?



                                             LOVELY PROFESSIONAL UNIVERSITY                                    47
   48   49   50   51   52   53   54   55   56   57   58