Page 78 - Open Soource Technologies 304.indd
P. 78
Web Technologies-I
Notes ASP-style tags are not enabled by default. To use these tags, either build PHP with the enable-
asp-tags option or enable asp_tags in the PHP configuration file.
3.6.4. Script Style
The final method of distinguishing PHP from HTML involves a tag invented to allow client-
side scripting within HTML pages, the <script> tag. You might recognize it as the tag in which
JavaScript is embedded. Since PHP is processed and removed from the file before it reaches the
browser, you can use the <script> tag to surround PHP code. To use this method, simply specify
“php” as the value of the language attribute of the tag:
<script language=”php”> echo “Hello, world”; </script>
This method is most useful with HTML editors that work only on strictly legal HTML files and
do not yet support XML processing commands.
3.6.5 Echoing Content Directly
Perhaps the singlemost common operation within a PHP application is displaying data to the user.
In the context of a web application, this means inserting into the HTML document information
that will become HTML when viewed by the user.
To simplify this operation, PHP provides special versions of the SGML and ASP tags that
automatically take the value inside the tag and insert it into the HTML page. To use this feature,
add an equals sign (=) to the opening tag. With this technique, we can rewrite our form example as:
<input type=”text” name=”first_name” value=”<? =”XYZ”; ?>”>
If you have ASP-style tags enabled, you can do the same with your ASP tags:
<p>This number (<%= 2 + 2 %>) <br /> and this number (<% echo (2 + 2); %>) <br /> Are the
same. </p>
After processing, the resulting HTML is:
<p>This number (4) <br /> and this number (4) <br /> are the same. </p>
Tyco Flow Control
yco Flow Control is an industrial manufacturer with a global presence. As the company
grew through acquisitions, it also acquired a wide variety of e-mail systems across all
Tits offices. To simplify IT management and increase communication reliability, the
company investigated hosted e-mail solutions. After evaluating other vendors, Tyco Flow
Control chose Microsoft Exchange Online for its features and reliability.
Business Needs
Tyco Flow Control, a major division of Tyco International, brings innovation and creativity
to its line of market-leading flow control products and heat-tracing solutions in the oil and
gas, power, chemical, building, and other industries. The company has 15,000 employees and
annual revenues exceeding US $4.5 billion.
Tyco Flow Control has approximately 12,000 desktops in over 250 locations around the
world. The company has grown through numerous acquisitions over the past ten years and,
as a result, the IT department found itself managing a heterogeneous assortment of servers,
Contd...
72 LOVELY PROFESSIONAL UNIVERSITY