Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Integrating PHP and Perl


Perl is a language often associated with text processing and CGI. PHP is
a language often associated with dynamic Web pages. Both are very popular
with Web developers. Often, each of these languages is used at the expense of
the other. Hard-core Perl developers would love to develop everything in
Perl, and PHP developers tend to stick with PHP.
As usual in the Open Source
world, there is a lot of zealotry between users of each language. If you
think that one of these languages is perfect and the other is lame,
this article is not for you! This article is for those who take a more
pragmatic approach and use what works best for them. Each language has
its strengths and limitations. Personally, I use both languages at work
and at home. With time, I have discovered which language is best for which
tasks and
try to integrate the strengths of each language as much as possible to
complete my work quickly.
Perl is extremely good at
system administration and extensive data processing, among other
things. This means, if you want to do some extensive processing on a text
report, Perl would be preferable, as it provides handy
regular-expression-enabled text comparisons, which make it so much easier to
search through a report. Perl also has extensive string manipulation
features. Perl, by virtue of being older than PHP and having an extensive
community, has thousands of extensions archived in CPAN, which allow
one to do virtually anything with the language, conveniently. from XML
processing to writing to parallel port devices, CPAN includes
everything. CPAN is the reason Perl continues to be useful to a
large number of developers to date. Although it is not impossible to do
everything described here with PHP and a mixture of other languages, it's
simply more convenient with
Perl.
PHP is extremely good at integration with Web pages and databases. PHP
integrates nicely with static HTML Web pages. That's why it's so
popular and has


Ïà¹ØÎĵµ£º

PHPʵÏÖ¡¯·þÎñÆ÷ÍÆ¡¯£¨flushº¯ÊýʹÓã©

×î½üÒ»Ö±ÔÚ×ö×Ô¼ºµÄͼÊéÕ¾£¬·Ö±ðʹÓùý½ÜÆæºÍ¶Á°ÉÁ½Ìײ»Í¬µÄϵͳ£¬¶ÔÓÚÕâÁ½Ì×ϵͳҲÊÇÓÖ°®ÓÖºÞ£¬°®µÄÊÇËûÃǵŦÄÜÇ¿´ó£¬ºÞËûÃǶ¼Í¬ÊôûÓпªÔ´¾«ÉñµÄ²úÎï¡£ºÇºÇ£¬×÷ΪһÃûÇî³ÌÐòÔ±£¬°³¿ÉÒÔÀí½â×÷ÕߵĿàÖÔ£¬ÕâÀï¾Í²»ÅúÅÐÁË¡£
Äê¼ÙÆڼ䣬ÎÞÊ¿É×ö£¬·­¿´×Ô¼ºÒÔÇ°µÄ²É¼¯´úÂ룬·¢Ïֺܶà¿ÉÒÔÓÅ»¯ºÍÌáÉýµÄµØ·½£¬¾Í¼òµ¥×öÁËÏÂÓÅ» ......

ʵ¼Ê¿ª·¢ÖпÉÄÜÓõ½µÄPHPµÄ×Ö·û´®²Ù×÷º¯Êý(×ܽá)

ÔÚ±à³ÌµÄ¹ý³Ìµ±ÖÐ,×Ö·û´®µÄ²Ù×÷ÊǷdz£ÖØÒªµÄ²¢ÇÒ¾­³£»á±»Óõ½,×Ö·û´®³£ÓõIJÙ×÷¾ßÌåµÄ°üÀ¨×Ö·û´®µÄÆ´½Ó,Ìæ»»×Ö·û´®,²éÕÒ×Ö·û´®,±È½Ï×Ö·û´®,¸´ÖÆ×Ö·û´®ÒÔ¼°¼ÆËã×Ö·û´®µÄ³¤¶ÈµÈµÈ.
1,Æ´½Ó×Ö·û´®
Æ´½Ó×Ö·û´®ÊÇ×î³£Óõ½µÄ×Ö·û´®²Ù×÷Ö®Ò»,ÔÚPHPÖÐÖ§³ÖÈýÖÖ·½Ê½¶Ô×Ö·û´®½øÐÐÆ´½Ó²Ù×÷,·Ö±ðÊÇÔ²µã.·Ö¸ô·û{}²Ù×÷,»¹ÓÐÔ²µãµÈºÅ.=À´½ø ......

PHPÖÐÕýÔò±í´ïʽµÄʹÓ÷½·¨[±Ê¼Ç]

ÔÚѧϰphpʱ£¬¿´µ½µÄ£¬×ö¸ö±Ê¼Ç
×Ö·û´®Í·²¿£º^
<?php echo ereg(“^hello”,”hello world!”); ?>
 
×Ö·û´®Î²²¿£º$
<?php echo ereg(“bye$”,”goodbye”); ?>
 
ÈÎÒâµÄµ¥¸ö×Ö·û£º.
<?php echo ereg(“.”,”goodbye”); ......

phpÖмÆËãʱ¼ä²îµÄ¼¸ÖÖ·½·¨

ÔÚphpÖмÆËãʱ¼ä²îÓÐʱºòÊǼþÂé·³µÄÊÂ!²»¹ýÖ»ÒªÄãÕÆÎÕÁËÈÕÆÚʱ¼äº¯ÊýµÄÓ÷¨ÄÇÕâЩҲ¾Í±äµÄ¼òµ¥ÁË:  
Ò»¸ö¼òµ¥µÄÀý×Ó¾ÍÊǼÆËã½èÊéµÄÌìÊý,ÕâÐèÒªphp¸ù¾ÝÿÌìµÄÈÕÆÚ½øÐмÆËã,ÏÂÃæ¾ÍÀ´Ì¸Ì¸ÊµÏÖÕâÖÖÈÕÆÚ¼ÆËãµÄ¼¸ÖÖ·½·¨:
(1) Èç¹ûÓÐÊý¾Ý¿â¾ÍºÜÈÝÒ×ÁË!ÈôÊÇMSSQL¿ÉÒÔʹÓô¥·¢Æ÷!ÓÃרÃżÆËãÈÕÆÚ²îµÄº¯Êýdatediff()±ã¿É ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ