Научная статья на тему 'Php: the best web-programming language'

Php: the best web-programming language Текст научной статьи по специальности «Языкознание и литературоведение»

CC BY
561
155
i Надоели баннеры? Вы всегда можете отключить рекламу.

Аннотация научной статьи по языкознанию и литературоведению, автор научной работы — Сорин Д.Б.

PHP является лучшим языком для веб-программирования в мире. С его помощью можно создавать как большие корпоративные сайты, так и, например, маленькие скрипты для администрирования вашей операционной системы. Нижеизложенный доклад раскрывает преимущества и недостатки этого языка.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «Php: the best web-programming language»

PHP: THE BEST WEB-PROGRAMMING LANGUAGE

Д.Б. Сорин Научный руководитель - Т.В. Примакина

PHP является лучшим языком для веб-программирования в мире. С его помощью можно создавать как большие корпоративные сайты, так и, например, маленькие скрипты для администрирования вашей операционной системы. Нижеизложенный доклад раскрывает преимущества и недостатки этого языка.

Introduction

Internet appeared in the second half of the 20th century. Firstly it was a network connecting different American universities. Afterwards it grew into the biggest network connecting millions of people all over the world. Today's internet is a large variety of different sites. You can find practically everything on the internet. The most famous sites have millions of visitors every day. They have to possess the freshest information. News appears on these sites in a moment. And meanwhile these sites consist of many cascade style sheets, HTML-code (the language of web-pages on the internet), server and client scripts -and these integral parts of the web-page and the whole site occupy the disc and server space. And the daily changing of the content is really hard as it requires the changing of the whole code, changing of the scripts and changing of the whole content. Often these tiresome and hard operations can be divided in some groups of monotonous operations. And the operations in these groups can be carried out in the similar way.

The simple and mostly used goal of the server web-programming languages is to create and give out dynamically generated web-pages. This is the way of fast generating of the content without the straight changing of the code of the site. For example, you have a web-page which consists of many tables, layers and scripts. If you want to add a column or another element to the code of the page, you have to make the changes in the whole code of the page. And if you can use the server web-programming language tools you can for example just insert the text in the text field and the whole content of the site will change. This is very convenient way. You can achieve great changes without great efforts.

The legend of PHP

Nowadays there are a lot of server web-programming languages. Some of them are closely connected with web-servers, operational systems or with the browsers and cannot process without them. These languages are often created by the famous oligarchic corporations which are engaged in almost everything.

ASP.NET was created by the Microsoft Corporation. This corporation has to create all the needed software including the software for web-pages development so that the users wouldn't have a need to choose another platform (UNIX or its twins). The .NET technology was made specially for these needs. Advantage of this technology is deep integration in Windows that allows doing really advanced things. And a disadvantage of this technology is that a server and clients should work under control of Windows and a browser must be Internet Explorer. ASP.NET is the main web software product of Microsoft. ASP.NET is really strong competitor of PHP language that allows to bring all the power of Windows interface in Web-applications. However it is widespread more in the West than in Russia. It is simply the economic factor. In our country hosting-providers prefer to study all and to adjust PHP-hosting on FreeBSD, and in the West hosting-providers cannot allow "free-of-charge" hosting. It is easier to pay for Windows licenses, MS SQL server, but then it is clear from whom to demand the penalty, against whom to bring an action and where to demand updates. The disadvantages of ASP.NET is dependence on Windows platform (and from Internet

Explorer), complexity of development of technology and difficulty of development of Web-applications in comparison with the PHP.

Java was created by the Sun Corporation - a giant who makes money with the sale of servers on the basis of UNIX. As a company selling brand servers it couldn't sell to buyers the empty servers, therefore it developed commercial UNIX and has created Java-technology that is an analogue of ASP.NET in the world of UNIX. The difference between them is that ASP.NET is multilanguage one-platform, and Java is one-language crossplatform technology. The advantages of the Java-technology are: Java is a legend, 90th years have passed under the symbol of Java, technologies that appeared for the first time in it became the standard de facto. Disadvantages: the slow, confused system of libraries, the unreasonable use of memory which the famous collector of dust returns to virtual Java-machine, but not to operational system. At universities Java is preferred because it is a legend. It should be studied at first because the object-oriented approach appeared here in its final variant. The most advanced object-oriented model considerably surpassing object-oriented model C++ in flexibility is realized in it (by the way, developers in PHP try to realize Java-model nowadays, but current realization is still enough raw). At the moment Java is at the decrease. The reason of it: instead of making Java a receiver of C++ (more powerful universal language, as it was supposed all over again), it has transformed into the web-technology including both server and client parts. This technology demands not universal server like Apache but specific that are very whimsical. The technology became enough artificial and complex in development and using, though the ideas that lie in its beginnings are very beautiful and advanced.

Besides there are small firms and communities which create their own languages. Thanks to these groups we have ColdFusion, PHP, Perl, Python and some others.

ColdFusion. In the modern Internet there are sites consisting of CFM-files. CFM - is deciphered as ColdFusion. It is an environment, with own server, own language and own functions. ColdFusion is not widespread nowadays in Russia. As there are few supporting materials for CFML (Cold Fusion Markable Language - like HTML) in Russian. The language itself is simple, functions are enough logical. The interface of ColdFusion Studio program created by Macromedia repeats HomeSite as it is made on the basis of HomeSite. It seems to much, that ColdFusion practically beats off the ability to think. All is done by the automatic device. And in PHP you won't be able to write a simple line if you don't know the syntax. Many people after some years of work on ColdFusion turn to PHP. The reasons -ColdFusion is expensive (though "free-of-charge" hostings on it already have begun to appear), unpopular in Russia and few free scripts are present on it that strongly complicates its studying.

Perl has appeared firstly and unlike ASP and PHP it is not only server language. Simply CGI-programs can be easier created on it than with the help of C. Its strong part is creating of short scripts for administrating of the machines. PHP and Perl are very Unix-oriented languages and the methods of decisions of the problems in these languages are simple and elegant unlike Java and ASP.NET. Perl is the main ancestor of PHP. So PHP is considered to be a descendant of Perl and it's possible to tell that PHP is civilized Perl made specially for web. Perl is specially created for manipulation with the text, for example regular expressions in it are not caused by functions as in PHP - they are the constructions of language (it is the most powerful dialect of regular expressions today). And in general style of a writing the programs on Perl is more "hacker". Perl is not a simple language - it is a culture. People write verses on Perl, compete in making the most intricate program. Giving people an opportunity to read the code stands on the last place in Perl programming, on the first place is put the beauty of the program and elegance of the decision. Although PHP has inherited the majority of the features of Perl, it is more civilized - giving people an opportunity to read the code stands on the first place as PHP is used not as a hobby but for making money. The ideas and the methods in PHP and Perl are often the same but the syntax differs considerably. For

example Perl functions have no classical parameters, record in a file or a target stream is carried out by the operator <> and regular expressions are written directly in the body of the program.

PHP has appeared later because of the rapid Internet development. It has taken much from Perl, but contains less "hacker" methods and in general is more readable. It is considered to be the most convenient language of web-programming in the world. Any university is very conservative and therefore PHP studying there still isn't widespread. The matter is that the strong evolution of PHP is still going on and the language has still not completely developed. If you develop the applications now you must be ready that in a few years after they should be re-written from the beginning. Standards are absent, adjustments are so flexible, that the code developed for one server can not work for another. Thus, earlier the name of the constructor in a class, as well as in C++ was the same as a name of a class. Since PHP 5 special keywords

_construct and_destruct are allocated for the constructor and destructor. Whether the old

scheme would be supported is not known. Earlier it was possible to use external variables under their name. Now superglobal arrays are recommended for this purpose (and in following versions it can become the obligatory requirement). Speed of applications' creating on PHP is above than at competitors approximately twice. Its unique disadvantage is that it still has not absolutely developed and its evolution continues. Still JavaScript is to be used in PHP-applications, because PHP is only server language and during the development of large web-applications you cannot avoid the work made on client's part. PHP is a very perfidious language. At the first acquaintance there is an impression, that it as is simple as Visual Basic, but actually it is a little bit intricate and here is the reason of it. The person who knows Delphi, knows that Delphi is logic continuation of Pascal. It is other language, but it logically follows Pascal. Some kind of symbiosis of Pascal and WinAPI. It is very simple: if you know Pascal you will know Delphi, and besides if you also know WinAPI, you will simply be the guru in the field of Delphi. PHP itself is a logic continuation of Perl. As Perl possesses the confused syntax and did not intend for using in web-environment, PHP has very well got accustomed in Web - its syntax is easier, and decisions are terribly simple (beat ASP.NET and Java in the field of simplicity and, hence, in the speed of development). And the goal of PHP is opposition to Java (SUN) and ASP.NET (Microsoft) - therefore here half of functions does not work under Windows, therefore it is so complex for studying: the person studying PHP must firstly study Unix file system, Berkley sockets and the Internet itself (HTTP, mail protocols, RFC etc). And one of the main things of PHP-libraries. In PHP there are original libraries - GDLib (dynamic generation of images), PDFLib (dynamic generation PDF), work with databases etc. As in Delphi it is possible to write the self-made libraries (not in PHP but in C++). It is not necessary to consider PHP to be a simple script language. It is more likely the answer of *NIX communities on Java-technology and ASP.NET. This technology is often named "PHP+Apache+MySQL (all under UNIX)"-community. PHP is the young non-standardized language, frequently inconsistent. It leaves the impression of being non-completed and non-harmonious. If Perl is non-perpendicular and C is perpendicular, PHP is neither Perl, nor C - it is in the middle. It is conveniently, but it is not graceful. The beautiful code can be created everywhere and its beauty will be determined with its harmony and culture. It is possible to create a beautiful code on PHP, simplicity and reading ability are the real attributes of beauty. The beauty of a code is defined not by a code, but by the community of programmers - if it seems to people who read a code it beautiful, it is beautiful. "The black square" itself by Malevich is beautiful but the value of a picture is that a picture is one in a series and it is written in a context of other pictures. The code acts in the same way. It is possible to create a beautiful code on PHP, it is intended for Web and it is the best in the area of web-programming.

PHP history. PHP has come a long way in the last few years. Growing to be one of the most prominent languages powering the Web was not an easy task. PHP succeeds an older

product, named PHP/FI. PHP/FI was created by Rasmus Lerdorf in 1995, initially as a simple set of Perl scripts for tracking accesses to his online resume. He named this set of scripts 'Personal Home Page Tools'. As more functionality was required, Rasmus wrote a much larger C implementation, which was able to communicate with databases, and enabled users to develop simple dynamic Web applications. Rasmus chose to release the source code for PHP/FI for everybody to see, so that anybody can use it, as well as fix bugs in it and improve the code. PHP/FI, which stood for Personal Home Page / Forms Interpreter, included some of the basic functionality of PHP as we know it today. It had Perl-like variables, automatic interpretation of form variables and HTML embedded syntax. The syntax itself was similar to Perl. By 1997, PHP/FI 2.0, the second write-up of the C implementation, had a cult of several thousand users around the world, with approximately 50,000 domains reporting as having it installed, accounting for about 1% of the domains on the Internet. While there were several people contributing bits of code to this project, it was still at large a one-man project. PHP/FI 2.0 was officially released only in November 1997, after spending most of its life in beta releases. It was shortly afterwards succeeded by the first alphas of PHP 3.0. PHP 3.0 was the first version that closely resembles PHP as we know it today. It was created by Andi Gutmans and Zeev Suraski in 1997 as a complete rewrite, after they found PHP/FI 2.0 severely underpowered for developing an eCommerce application they were working on for a University project. In an effort to cooperate and start building upon PHP/FI's existing userbase, Andi, Rasmus and Zeev decided to cooperate and announce PHP 3.0 as the official successor of PHP/FI 2.0, and development of PHP/FI 2.0 was paused. One of the biggest advantages of PHP 3.0 was its strong extensibility features. In addition to providing users with a solid infrastructure for lots of different databases, protocols and APIs, PHP 3.0's extensibility features attracted dozens of developers to join in and submit new extension modules. This was the key to PHP 3.0's tremendous success. Other key features introduced in PHP 3.0 were the object oriented syntax support and the much more powerful and consistent language syntax. The whole new language was released under a new name, that removed the implication of limited personal use that the PHP/FI 2.0 name held. It was named plain 'PHP', with the meaning being a recursive acronym - PHP: Hypertext Preprocessor. By the end of 1998, PHP grew to an install base of tens of thousands of users and hundreds of thousands of Web sites reporting it installed. At its peak, PHP 3.0 was installed on approximately 10% of the Web servers on the Internet. PHP 3.0 was officially released in June 1998, after having spent about 9 months in public testing. By the winter of 1998, shortly after PHP 3.0 was officially released, Andi Gutmans and Zeev Suraski had begun working on a rewrite of PHP's core. The design goals were to improve performance of complex applications, and improve the modularity of PHP's code base. Such applications were made possible by PHP 3.0's new features and support for a wide variety of third part databases and APIs, but PHP 3.0 was not designed to handle such complex applications efficiently. The new engine, dubbed "Zend Engine" (comprised of their first names, Zeev and Andi), met these design goals successfully, and was first introduced in mid 1999. PHP 4.0, based on this engine, and coupled with a wide range of additional new features, was officially released in May 2000, almost two years after its predecessor, PHP 3.0. In addition to the highly improved performance of this version, PHP 4.0 included other key features such as support for many more Web servers, HTTP sessions, output buffering, more secure ways of handling user input and several new language constructs. Today, PHP is being used by hundreds of thousands of developers, and several million sites report as having it installed, which accounts for over 20% of the domains on the Internet. PHP's development team includes dozens of developers, as well as dozens others working on PHP-related projects such as PEAR and the documentation project. PHP 5 was released in July 2004 after long development and several pre-releases. It is mainly driven by its core, the Zend Engine 2.0 with a new object model and dozens of other new features. Nowadays it is still not widely spread because the PHP 4 language is also very convenient and

the hosting providers do not want to change anything. The history of PHP cannot be full without a few words about PEAR. PEAR, the PHP Extension and Application Repository is PHP's version of foundation classes, and may grow in the future to be one of the key ways to distribute PHP extensions among developers. PEAR was born in discussions held in the PHP Developers' Meeting (PDM) held in January 2000 in Tel Aviv. It was created by Stig Bakken. Since early 2000, PEAR has grown to be a big, significant project with a large number of developers working on implementing common, reusable functionality for the benefit of the entire PHP community. PEAR today includes a wide variety of infrastructure foundation classes for database access, content caching, mathematical calculations, eCommerce and much more.

PHP opportunities. PHP can do everything. Mainly scope of PHP is focused on a writing the scripts working on the part of a server; thus PHP is capable to carry out all that any other CGI-program carries out, for example, to process the given forms, to generate dynamic pages or to send and accept cookies. But PHP is capable to carry out many other problems. There are three basic areas where PHP is used. The first is creating scripts for performance on the part of a server. PHP is most widely used for this. The only thing that is required for this purpose is PHP parser (in the form of CGI-program or the server module), web-server and a browser. You need a working web-server and installed PHP to see the results of our PHP-scripts' work in a browser. The second area is creating scripts for performance in a command line. You can create a PHP-script that can be started without dependence from web-server and a browser. The only thing that is required is PHP parser. Such way of using PHP is ideally for scripts which should be carried out on a regular basis, for example, by Cron (on platforms *nix or Linux) or by Task Scheduler on Windows platforms. These scripts can also be used to process texts like Perl scripts. And finally the third area of using PHP is creating the scripts that work on client's part. It is called PHP-GTK. Using PHP-GTK you can create cross-platform applications. PHP is accessible to the majority of operational systems, including OS/2, Linux, many Unix twins such, as HP-UX, Solaris and OpenBSD, Microsoft Windows, Mac OS X, RISC OS, and many others. Also the support of the majority modern web-servers such as Apache, Microsoft Internet Information Server, Personal Web Server, Netscape and iPlanet servers and others is included in PHP. For the majority of servers PHP is delivered as the module and for others, supporting CGIstandard, PHP can process as CGI-module. Thus, choosing PHP, you receive the freedom of choice of operational system and web-server. Besides you have a choice between using of procedural or object-oriented programming or their combination. Though current version PHP supports not all the features of OOP, many libraries of a code and large applications, including PEAR library, are written only with OOP-using. PHP is not only capable to give out HTML. Opportunities of PHP include formation of images, PDF-files and even Flash created "in real-time". PHP is also capable to give out any text, such as XHTML and other XMLfiles. PHP is capable to carry out automatic generation of such files and to keep them in file system of your server instead of giving to the client, thus, making the cache of dynamic content, located on the part of a server. One of significant advantages of PHP is the support of the broad audience of databases. Creating of the script using databases is very simple. Also in PHP DBX-support for work at an abstract level is included, so you can work with any database using DBX. Besides PHP supports ODBC (Open Database Connection standard), thus, you can work with any database supporting this world-wide recognized standard.

The core of PHP 5. Zend Engine 2

The name Zend refers to the language engine, PHP's core. The term PHP refers to the complete system as it appears from the outside. This might sound a bit confusing at first, but it's not that complicated. To implement a Web script interpreter, you need three parts: 1) the interpreter part which analyzes the input code, translates it and executes it, 2) the functionality

part which implements the functionality of the language (its functions, etc.), 3) the interface part talks to the Web server, etc. Zend takes part 1 completely and a bit of part 2; PHP takes parts 2 and 3. Together they form the complete PHP package. Zend itself really forms only the language core, implementing PHP at its very basics with some predefined functions. PHP contains all the modules that actually create the language's outstanding capabilities. PHP can be extended primarily at three points: external modules, built-in modules, and the Zend engine. The following sections discuss these options.

External modules can be loaded at script runtime using the function dl(). This function loads a shared object from disk and makes its functionality available to the script to which it's being bound. After the script is terminated, the external module is discarded from memory. This method has both advantages and disadvantages. The advantages are: 1) external modules don't require recompiling of PHP, 2) the size of PHP remains small by "outsourcing" certain functionality. And the disadvantages are: 1) the shared objects need to be loaded every time a script is being executed (every hit), which is very slow, 2) external additional files clutter up the disk, 3) Every script that wants to use an external module's functionality has to specifically include a call to dl(), or the extension tag in php.ini needs to be modified (which is not always a suitable solution). To sum up, external modules are great for third-party products, small additions to PHP that are rarely used, or just for testing purposes. To develop additional functionality quickly, external modules provide the best results. For frequent usage, larger implementations, and complex code, the disadvantages outweigh the advantages. Third parties might consider using the extension tag in php.ini to create additional external modules to PHP. These external modules are completely detached from the main package, which is a very handy feature in commercial environments. Commercial distributors can simply ship disks or archives containing only their additional modules, without the need to create fixed and solid PHP binaries that don't allow other modules to be bound to them.

Built-in modules are compiled directly into PHP and carried around with every PHP process; their functionality is instantly available to every script that's being run. Like external modules, built-in modules have advantages and disadvantages. Advantages: 1) no need to load the module specifically; the functionality is instantly available, 2) no external files clutter up the disk; everything resides in the PHP binary. And the disadvantages are: 1) changes to built-in modules require recompiling of PHP, 2) the PHP binary grows and consumes more memory. Built-in modules are best when you have a solid library of functions that remains relatively unchanged, requires better than poor-to-average performance, or is used frequently by many scripts on your site. The need to recompile PHP is quickly compensated by the benefit in speed and ease of use. However, built-in modules are not ideal when rapid development of small additions is required.

The Zend Engine. Of course, extensions can also be implemented directly in the Zend engine. This strategy is good if you need a change in the language behavior or if you require special functions to be built directly into the language core. In general, however, modifications to the Zend engine should be avoided. Changes here result in incompatibilities with the rest of the world, and hardly anyone will ever adapt to specially patched Zend engines. Modifications can't be detached from the main PHP sources and are overridden with the next update using the "official" source repositories. Therefore, this method is generally considered bad practice.

Memory management. Resource management is a crucial issue, especially in server software. One of the most valuable resources is memory, and memory management should be handled with extreme care. Memory management has been partially abstracted in Zend, and you should stick to this abstraction for obvious reasons: Due to the abstraction, Zend gets full control over all memory allocations. Zend is able to determine whether a block is in use, automatically freeing unused blocks and blocks with lost references, and thus prevent memory leaks. The functions to be used are described here: 1) emalloc() - serves as

replacement for malloc(), 2) efree() - serves as replacement for free() ... and 4 others. emalloc(), estrdup(), estrndup(), ecalloc(), and erealloc() allocate internal memory; efree() frees these previously allocated blocks. Memory handled by the e*() functions is considered local to the current process and is discarded as soon as the script executed by this process is terminated. To allocate resident memory that survives termination of the current script, you can use malloc() and free(). This should only be done with extreme care, however, and only in conjunction with demands of the Zend API; otherwise, you risk memory leaks. Zend also features a thread-safe resource manager to provide better native support for multithreaded Web servers. This requires you to allocate local structures for all of your global variables to allow concurrent threads to be run. Because the thread-safe mode of Zend was not finished back when this was written, it is not yet extensively covered here.

Header files inclusions. The only header file you really have to include for your modules is "php.h", located in the PHP directory. This file makes all macros and API definitions required to build new modules available to your code. It's good practice to create a separate header file for your module that contains module-specific definitions. This header file should contain all the forward definitions for exported functions and include "php.h".

Examples

IO Index of/ - Mozilla Firefox 0®В|

Файл Правка Вид Переход Закладки Инструменты Справка

й? http;//127.0.0.1/ v| © Перейти Дт

1 ; pledlska Великоле.. Q [ Панель Админист... ö Qlndemjf/

Index of /

Naine Last modified Size

а т т FTP manager.php 28-Oct-2 005 23 : : 45 86E

Id.php 20-Apr-2 006 10: : 01 2 6E

PEAR.php 2 6-Feb-2 006 04: : 3 7 ЗОЕ

и т archive/ 2 6-Aug-2 006 10: : 13 -

create sql.php 02-Oct-2 006 01: : 45 2 . IE

CJ cutenews/ 07-Oct-2 005 15: : 10 -

CJ duiriper/ 11-Jun-2 006 20: : 3 5 -

0 gbxml/ 25-Hay-2006 09: : 09 -

goloval5.php 2 6-Aug-2 006 10: : 16 10E

J3 music vl.mp3 lB-Sep-2006 22 : : 3 1 4.4И

J3 а а music vlv2.mp3 18-Sep-2 006 21: :20 4.4И

phpMyAditlin/ 2 0-Apr-2 00 6 10: : 14 -

php 2.php 19-Apr-2 00 6 23 : : 04 1.8K

phpinfo.php 3 0-Sep-2 005 21: : 57 18

т т rapidshare/ 17-Jul-2 00 6 15: : 5 6 -

rgb.php 17-Feb-2 006 19: : 2 8 507

test.php 02-Oct-2 006 01: : 44 1.5E

CJ xajax 0.2.3/ 17-Jun-2 006 20: : 2 6 -

АтгЬеП n Tí (Winm PWP/Í 1 ? Server at ¡7.7MM.! Pnrt ЯП v

Готово ÍLi

'S пуск '*> & @ tÖIndei off -Mozilla Fir... т {FTP :srv009. ¡nf obox..,. ^oc - Microsoft... RL 4^x5' C^Lij & ¡51

Pic. 1. The Apache window

P html, php - Notepad

Файл Правка Вид Конвертация Поиск Вставить Справка

□ а? В в

iFtF а

|HTML-M.[

"3

70 }

71

72 while (5 row = mysql fetch assoc(Squery))

73 {

74 ¡Jitem url = S parent. !jrow[ 1 url']."/";

75 Sitem name = ?row[1 name'];

76 ¡Jitem id = ¡Jrow[ 1 id1 ] ;

77

78 if (5 item id — ^rubric id]

79 {

80 Snav rubrics .= str replace("{ITEM NAME}",?item name,$ active tpl) ."\r\n".?spaces tpl;

82 } else

83 {

84 $ array1 = array("{1ТЕИ NAME} ", "{ITEM URL}");

85 $array2 = array(Sitem name,iitem url);

86 Snav rubrics .= str replace($arrayl,$array2,$ items tpl) .r\n".Sspaces tpl;

87 }

89 return str_replace("{WAV_RUBRICSJ$nav_rubrics,$nav_tpl);

90 }

91 else

92

93 $nav tpl = file get contents(^options[1tpl dir1]."inner nav only.html");

94 return str replace("{TOP MSG}",$row[1 name 1 ] ,$nav tpl);

95 }

96

97

98 // Возвращает картинку и ее размеры

99 function get section pic(?rb array,$for404 = false)

100 {

101 global 5opt ions;

102 Spic tpl = file get contents(Soptions[1tpl dir1]."section pic.html");

103

104 $sql = "SELECT section pic FROM ".5options[1 table prefix1]."rubrics WHERE url = '".$rb array[0].' 1 AND parent id = 1

105 $ query = mysql query($sql) or die(mysql error());

106 â

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

Стр: 1 Столб; О

Pic. 2. Simple PHP code

Pic. 3. Results of PHP work in Mozilla FireFox browser

Pic. 4. Another site written on PHP

nycK t> '<> # e iQrpynnos...

Summary

Nowadays PHP is the most convenient language for creating web-applications. Its evolution is still going on, its object-oriented model is still enough raw, its has many competitors - but it has so many advantages in comparison with its competitors and it is so convenient for studying that every person who wants to create own web-applications or who just wants to get acquainted with the world of web-programming should just learn its basics. And my experience tells that if you have learnt its basics you won't be able to give up its further studying. The world of PHP programming is very strange and interesting. Just don't forget 'bout your real life =).

Literature

1. PHP: Zend Engine /// PHP.net - official PHP site

2. PHP: History of PHP related projects /// PHP.net - official PHP site

3. The differences between PHP and Perl /// phpworld.com

4. Zend2 /// zend.com

5. Server-based languages /// phpworld.com

6. .NET technology /// Microsoft.com - official Microsoft corp. site

7. World of Java /// sun.com - official Sun corp. site

8. Different articles about the history of PHP /// www.softtime.ru/forum - SoftTime IT-studio (Nizhny Novgorod)

i Надоели баннеры? Вы всегда можете отключить рекламу.