mirror of https://github.com/tLDP/LDP
aldev updates
This commit is contained in:
parent
729aa8653f
commit
c9532924ac
|
@ -45,7 +45,7 @@ PHP HOW-TO
|
|||
" name="
|
||||
alavoor[AT]yahoo.com
|
||||
">
|
||||
<date>v27.3, 03 Aug 2002
|
||||
<date>v27.4, 24 Aug 2002
|
||||
<abstract>
|
||||
This document tells you howto develop PHP programs and also to migrate all the
|
||||
Windows 95 GUI applications to powerful PHP + HTML + DHTML + XML + Java applets + Javascript.
|
||||
|
@ -122,11 +122,12 @@ Tcl, VB script, ASP are older and inferior technologies. Even Java/JSP is inferi
|
|||
<bf>Why PHP ?</bf>
|
||||
PHP is the best because of the following reasons:
|
||||
<itemize>
|
||||
<item> PERL is "YUCKY" (distasteful) because it is hard to read and
|
||||
maintain the programs. Not object oriented.
|
||||
Perl does not scale well in a large project with multiple active developers.
|
||||
It is commonly said that PERL is better suited for smaller, one-time projects.
|
||||
Forget PERL and goto PHP. PERL programmers like PHP!
|
||||
<item> PERL is the "ancestor" of PHP and PERL is used for a very long
|
||||
time (more than 25 years old?).
|
||||
PHP has an advantage over PERL - PHP supports client-side code and is easier to
|
||||
compile into a executable. User base of PERL is very large.
|
||||
PHP tries to imitate PERL and complement the PERL technology.
|
||||
PERL programmers like PHP!
|
||||
PHP is actually a "modern PERL", but with a different name called "PHP".
|
||||
<item> Java is object-oriented but is very SLOW. Java programs run very slow.
|
||||
Also Java is immensely complex
|
||||
|
@ -460,7 +461,7 @@ PHP can be used to create customized HTTP-based
|
|||
authentication mechanisms for the Apache web server.
|
||||
|
||||
<item> Variables, Arrays, Associative Arrays -
|
||||
PHP supports typed variables, arrays and even Perl-like
|
||||
PHP supports typed variables, arrays and even PERL-like
|
||||
associative arrays. These can all be passed from one web page
|
||||
to another using either GET or POST method forms.
|
||||
|
||||
|
@ -591,9 +592,9 @@ Programming consultant Reuven Lerner has made some comparisons
|
|||
among the languages. His view of PHP is summarized as follows:
|
||||
|
||||
"The language is easy to learn. Graphic artists and Web designers might claim that they are not programmers, but the fact is that they're doing increasingly
|
||||
large projects in JavaScript, VBScript, and other simple programming languages. PHP is much more regular and well-defined than Perl, and is much easier for
|
||||
large projects in JavaScript, VBScript, and other simple programming languages. PHP is much more regular and well-defined than PERL, and is much easier for
|
||||
new programmers to grasp than Java. Indeed, PHP seems like a server-side version of what JavaScript could have been, but isn't. Someone with little or no
|
||||
programming experience can learn PHP and work with it after a very short period of time. This is probably true for VBScript, but certainly not for Perl or
|
||||
programming experience can learn PHP and work with it after a very short period of time. This is probably true for VBScript, but certainly not for PERL or
|
||||
Java....PHP is a truly remarkable and powerful system.
|
||||
I can see why it has become a popular system for producing Web sites.... I think that it will be a very strong competitor against Java and JSPs, and will rise
|
||||
significantly in my recommendations for clients and internal use."
|
||||
|
@ -604,7 +605,7 @@ significantly in my recommendations for clients and internal use."
|
|||
<p>
|
||||
JSP enjoys the backing of Sun; hence its constant media attention. It is interesting to note that despite the lack of any publicity campaign, PHP's popularity is
|
||||
growing at a monthly rate of 8-11%, a percentage far greater than the Internet's 4% monthly growth -- as the demand for server-based applications has
|
||||
risen. More than 6.5 million sites use PHP (Netcraft May 2001 survey). PHP is used on 39% of Apache servers; Perl trails fourth, with 11% of the market.
|
||||
risen. More than 6.5 million sites use PHP (Netcraft May 2001 survey). PHP is used on 39% of Apache servers; PERL trails fourth, with 11% of the market.
|
||||
Apache maintains 59% of the Web server market; Microsoft IIS is second, with 28% of market share (E-Soft Inc./SecuritySpace's May 2001 report).
|
||||
|
||||
Prominent corporations using PHP include Unilever, Philips, NTT, Cisco, Japan Airlines, Air Canada, Lufthansa, GE Marketplace, Wallstreet:Online Germany;
|
||||
|
@ -622,7 +623,7 @@ AuctionWatch, VillageVoice, Dialpad and BMC.
|
|||
|
||||
<sect>Brief History of PHP
|
||||
<p>
|
||||
PHP began life as a simple little cgi wrapper written in Perl.
|
||||
PHP began life as a simple little cgi wrapper written in PERL.
|
||||
The name of this first package was Personal Home Page Tools, which
|
||||
later became Personal Home Page Construction Kit.
|
||||
|
||||
|
@ -636,10 +637,10 @@ based on these queries. This tool was named FI (Form Interpreter).
|
|||
PHP/FI version 2.0 is a complete rewrite of these two packages combined
|
||||
into a single program.
|
||||
It evolved to a simple programming language embedded inside HTML files.
|
||||
PHP eliminates the need for numerous small Perl cgi programs
|
||||
PHP eliminates the need for numerous small PERL cgi programs
|
||||
by allowing you to place simple scripts directly in your HTML files. This
|
||||
speeds up the overall performance of your web pages since the overhead of
|
||||
forking Perl several times has been eliminated.
|
||||
forking PERL several times has been eliminated.
|
||||
It also makes it easier to manage large web sites by placing
|
||||
all components of a web page in a single html file.
|
||||
By including support for various databases, it also makes it
|
||||
|
@ -773,7 +774,7 @@ ready to use PHP class libraries.
|
|||
<item> <bf>PHP classes</bf> are at <url url="http://phpclasses.upperdesign.com">.
|
||||
<p>
|
||||
<item> <bf>PEAR (PHP Extension and Application Repository)</bf> is a code repository
|
||||
for PHP extensions and PHP library code similar to Perl's CPAN and is at
|
||||
for PHP extensions and PHP library code similar to PERL's CPAN and is at
|
||||
<url url="http://pear.php.net"> and
|
||||
<url name="mirror" url="http://lxr.php.net/source/php4/pear">
|
||||
linux <url name="php-pear-rpms" url="http://rpmfind.net/linux/rpm2html/search.php?query=pear">
|
||||
|
@ -986,7 +987,7 @@ of data security. And it's free.
|
|||
|
||||
<p>
|
||||
<item> PEAR (PHP Extension and Application Repository) is a code repository
|
||||
for PHP extensions and PHP library code similar to Perl's CPAN and is at
|
||||
for PHP extensions and PHP library code similar to PERL's CPAN and is at
|
||||
<url url="http://lxr.php.net/source/php4/pear">
|
||||
and <url name="pear-tutorials" url="http://php.weblogs.com/php_pear_tutorials">.
|
||||
|
||||
|
@ -1490,10 +1491,10 @@ It is at <url url="http://phpdocu.sourceforge.net">.
|
|||
<p>
|
||||
<item> The <url name="Doxygen documentation" url="http://www.stack.nl/~dimitri/doxygen"> system
|
||||
can be used along with this
|
||||
<url name="Doxygen PHP Perl" url="http://www.stack.nl/~dimitri/doxygen/download.html#latestman">
|
||||
script. Download Doxygen and the Perl script from download page.
|
||||
<url name="Doxygen PHP PERL" url="http://www.stack.nl/~dimitri/doxygen/download.html#latestman">
|
||||
script. Download Doxygen and the PERL script from download page.
|
||||
<p>
|
||||
<item> PHPXref is a small Perl script to make working with the source code
|
||||
<item> PHPXref is a small PERL script to make working with the source code
|
||||
of a large PHP site somewhat easier.
|
||||
Cross references functions, variables and database tables defined
|
||||
and used across your various PHP files
|
||||
|
@ -1662,7 +1663,7 @@ And now copy the files from production to the deployment area.
|
|||
<sect> General purpose programming with PHP <label id = "genphp">
|
||||
<p>
|
||||
PHP is very powerful and is designed such that it can replace awk, sed,
|
||||
UNIX shell, Perl, Python, "C", C++ and Java.
|
||||
UNIX shell, PERL, Python, "C", C++ and Java.
|
||||
|
||||
|
||||
The object oriented features of PHP is developing very rapidly and in near future
|
||||
|
@ -1680,7 +1681,7 @@ The "-q" suppresses the printing of the HTTP headers. You can leave off
|
|||
this option if you like.
|
||||
|
||||
If you want to use PHP as a stand-alone program, just like a shell script,
|
||||
"C" or perl program, then use this technique:
|
||||
"C" or PERL program, then use this technique:
|
||||
<code>
|
||||
bash$ php -q filename.php
|
||||
bash$ php -h
|
||||
|
@ -1710,7 +1711,7 @@ language, you can use it develop standalone MS Windows GUI applications.
|
|||
PHP can be very easily combined with MS Windows C++ GUI classes to create
|
||||
GUI applications. And developing applications with PHP is extremely fast
|
||||
as it is a scripting language and it's runtime performance is also excellent
|
||||
as compared with other scripting languages like Perl, Visual Basic and Python.
|
||||
as compared with other scripting languages like PERL, Visual Basic and Python.
|
||||
|
||||
PHP can also be used for developing standalone GUI applications for Linux/UNIX'es.
|
||||
|
||||
|
@ -1822,7 +1823,7 @@ PHP will give you the freedom to select any server platform. The browser does
|
|||
not know that the HTML page is generated by PHP !!
|
||||
<item> PHP has excellent database conectivity to all SQL database servers.
|
||||
<item> PHP has partial support for Object oriented features
|
||||
<item> PHP has C++, Perl, Javascript like syntax features and has programs like
|
||||
<item> PHP has C++, PERL, Javascript like syntax features and has programs like
|
||||
'ptags/ctags' to navigate the source code
|
||||
<item> PHP has Zend optimizer which speeds up the performance
|
||||
<item> PHP runs on all UNIX'es, linux, Windows 95/NT/2000 and is more
|
||||
|
@ -2430,13 +2431,13 @@ see the documentation on building Ghostscript for details.
|
|||
This document is written in linuxdoc SGML format. The Docbook SGML format
|
||||
supercedes the linuxdoc format and has lot more features than linuxdoc.
|
||||
The linuxdoc is very simple and is easy to use. To convert linuxdoc SGML
|
||||
file to Docbook SGML use the program <bf>ld2db.sh</bf> and some perl scripts.
|
||||
file to Docbook SGML use the program <bf>ld2db.sh</bf> and some PERL scripts.
|
||||
The ld2db output is not 100% clean and you need to use the <bf>clean_ld2db.pl</bf>
|
||||
perl script. You may need to manually correct few lines in the document.
|
||||
PERL script. You may need to manually correct few lines in the document.
|
||||
<itemize>
|
||||
<item> Download ld2db program from <url url="http://www.dcs.gla.ac.uk/~rrt/docbook.html">
|
||||
or from <url name="Milkyway Galaxy site" url="http://www.milkywaygalaxy.freeservers.com">
|
||||
<item> Download the cleanup_ld2db.pl perl script from
|
||||
<item> Download the cleanup_ld2db.pl PERL script from
|
||||
from <url name="Milkyway Galaxy site" url="http://www.milkywaygalaxy.freeservers.com">
|
||||
</itemize>
|
||||
The ld2db.sh is not 100% clean, you will get lots of errors when you run
|
||||
|
@ -2447,7 +2448,7 @@ The ld2db.sh is not 100% clean, you will get lots of errors when you run
|
|||
bash$ docbook2html db.sgml
|
||||
</code>
|
||||
And you may have to manually edit some of the minor errors after
|
||||
running the perl script. For e.g. you may need to put closing tag <
|
||||
running the PERL script. For e.g. you may need to put closing tag <
|
||||
/Para> for each <
|
||||
Listitem>
|
||||
|
||||
|
@ -2951,5 +2952,64 @@ function CS_SendArray($array, $arrayStr = ""){
|
|||
}
|
||||
?>
|
||||
</code>
|
||||
|
||||
<sect> Appendix D - PERL versus PHP debate<label id="perldebate">
|
||||
<p>
|
||||
PERL (Practical Extraction and Reporting Language) is kind of ancestor
|
||||
of PHP. PERL is immensely powerful and is in use for a very long time,
|
||||
just like "C" language. PERL can do everything that "C" language does.
|
||||
You are better off programming in PERL than in "C" language!!
|
||||
Most of the "C" programmers prefer to program in PERL if speed is
|
||||
not that important (C programs is little faster than PERL).
|
||||
|
||||
PERL5 is fully OOP operational. Just because PERL can also do
|
||||
everything without OOP techniques does not mean it's not OOP.
|
||||
|
||||
Comparing PERL to PHP, in terms of readability and
|
||||
scalability, they are nearly equal although PHP has a slight
|
||||
advantage for those who insist on using only client side code.
|
||||
PERL is certainly easier to read than C due to it being a very high
|
||||
level language. As you know, the biggest obstacle to multiple developer
|
||||
maintenance is compilers from which PERL does not suffer.
|
||||
|
||||
PHP and PERL are equal in these ways:
|
||||
<enum>
|
||||
<item> High level code. English-like syntax is easy to read and logical
|
||||
<item> Execution speed. As raw interpreted source code, both are very fast
|
||||
(compared to VB and the like.)
|
||||
<item> Ease and speed of development. As scripts, both can be developed
|
||||
quickly bypassing the nasty compiler and with built-in intelligent
|
||||
debuggers.
|
||||
<item> Run anywhere. A dream these share which all other languages fail.
|
||||
<item> Superior text processing to all other languages.
|
||||
<item> Open source.
|
||||
<item> Both are very well supported by whole Internet community
|
||||
<item> Both are free.
|
||||
</enum>
|
||||
|
||||
Where PHP has an advantage over PERL:
|
||||
<enum>
|
||||
<item> Client-side code (for those who insist on such things.)
|
||||
<item> Easier to compile into EXE.
|
||||
</enum>
|
||||
|
||||
Where PERL might have an advantage over PHP.
|
||||
<enum>
|
||||
<item> PERL is already installed on every web server in the world
|
||||
automatically
|
||||
during setup.
|
||||
<item> PERL is more backward and forward compatible.
|
||||
<item> PERL in all it's versions is VERY stable.
|
||||
<item> PERL hooks into all existing dbase engines very easily. The
|
||||
necessary
|
||||
modules come with
|
||||
every PERL distribution. All that is required is up-to-date drivers
|
||||
which
|
||||
are easy to obtain. PERL and MySQL are made for each other.
|
||||
</enum>
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ Vi Improved with syntax color highlighting
|
|||
"name="
|
||||
alavoor[AT]yahoo.com
|
||||
">
|
||||
<date>v18.2, 03 Aug 2002
|
||||
<date>v18.3, 24 Aug 2002
|
||||
<abstract>
|
||||
This document is a guide to quickly setting up the Vim color editor on Linux or Unix systems. The information here will improve the productivity of programmers because the
|
||||
Vim editor supports syntax color highlighting and bold fonts, improving the
|
||||
|
@ -875,6 +875,8 @@ OR plain vanilla mode
|
|||
</CODE>
|
||||
It is very strongly recommended that you always use gvim instead of vim, since GUI mode
|
||||
with colors will definitely improve your productivity.
|
||||
The vim also gives colors but cannot set the background colors and gvim can set the
|
||||
background and foreground colors.
|
||||
|
||||
GUI mode gvim provides the following -
|
||||
<itemize>
|
||||
|
@ -945,6 +947,26 @@ usleep((unsigned long) 10000)
|
|||
|
||||
</itemize>
|
||||
|
||||
For transferring files from Unix to MS Windows use the ftp clients like
|
||||
<itemize>
|
||||
<item> Commercial :
|
||||
<enum>
|
||||
<item> The ftp voyager <url url="http://cws.internet.com/ftp-ftpvoyag.html">
|
||||
<item> Cute ftp <url url="http://cws.internet.com/ftp-cuteftp.html">
|
||||
</enum>
|
||||
|
||||
<item> Free ratings:
|
||||
<enum>
|
||||
<item> WSFTP : <url url="http://www.csra.net/junodj/ws_ftp32.htm">
|
||||
<item> LeechFTP <url url="http://cws.internet.com/ftp-leechftp.html">
|
||||
<url url="http://stud.fh-heilbronn.de/~jdebis/leechftp/">
|
||||
<item> FTP Control
|
||||
<url url="http://cws.internet.com/ftp-ftpcontrol.html">
|
||||
<item> GetRight <url url="http://cws.internet.com/ftp-getright.html">
|
||||
</enum>
|
||||
</itemize>
|
||||
|
||||
|
||||
|
||||
|
||||
<sect> Vi companions
|
||||
|
|
Loading…
Reference in New Issue