PHPµÄÃüÁîÐÐÃüÁîʹÓÃÖ¸ÄÏ

5年以前  |  阅读数:925 次  |  编程语言:PHP 

µ±Óû§´o¿ªphpÒ³Ãaeʱ£¬þÎñ¶Ë±aÖ´ÐÐPHPµÄÃuÁi²¢½«Ö´Ðнa¹u¢ËÍÖÁÓû§µÄa¯ÀÀÆ÷ÖУ¬ÕaÀaËÆÓÚASPºÍCoildFusion£¬PHP¿ÉÒÔÔËÐÐÔÚWINDOWSºÍ¶aÖÖ°ae±¾µÄUNIXÉÏ¡£³ýÁËÄܹ»²Ù×÷ÄuµÄÒ³ÃaeÍa£¬PHP»¹ÄÜ*¢ËÍHTTPµÄ±eÌa¡£

Äa¿ÉÒÔÉeÖÃcookie,¹ÜÀiÊý×ÖÇ(C)ÃuºÍÖض¨ÏoÓû§£¬¶øÇÒËuÌa¹(C)Á˼«ºÃµÄÁ¬Í¨ÐÔµ½ÆaËuÊý¾Ý¿a£¨»¹ÓÐODBC£(C)£¬¼¯³É¸÷ÖÖ Ía²¿¿aÀ´×oÓÃPDFÎĵµ½aÎoXMLµÄÈκÎÊÂÇe¡£ÄÇÄa»¹ÖªµÀ¿ÉÒÔÓÃphpµÄÇ¿´o¹¦ÄÜ×oµa±ðµÄ¶«Î÷Â𣿠ÔÚÒÔ¶ÀÁ¢µÄcgi*½Ê½ÔËÐÐʱ£¬ÐeÒªÒ»¸ophp¿ÉÖ´ÐгÌÐo£¬ËuÓкܶaÃuÁiÐвÎÊýµÄ£¬ÓÐÐ(C)¿ÉÒÔÓÃ×÷ºÜºÃÍaeµÄÓÃ;,ÏÂÃaeÊÇÈ«²¿µÄphpÃuÁiÐвÎÊý,ÆaÖÐ[]±iʾ ¿ÉÓпÉÎ޵ģ¬<>±iÊÇÒ»¶¨ÒªµÄ¡£

Óè php [-q] [-h] [-s] [-v] [-i] [-f ] | { [args...]} -q °²¾²Ä£Ê½¡£²»Êa³oHTTPÍ¡£
-s ½«php³ÌÐoÎļþÓÃת»¯Îª²ÊÉ«¸ñʽµÄHTML(±ÈÈç±£Áo×ÖÓÃÂÌÉ«£¬º¯ÊýºÍ±aÁ¿ÎªÀ¶É«£¬×¢ÊÍΪ»ÆÉ«¶ø×Ö´®ÔoÊǺiÉ«µÈµÈ¡£

-f ¶ÁÈe²¢½aÊÍÖ¸¶¨µÄÎļþ¡£

-c ÔÚÖжÁÈephp.iniÎļþ

-a ½»»¥Ê½ÔËÐÐ

-d foo[=bar] ¶¨ÒainiÖеÄÊaÈeÏi foo µÄֵΪ bar

-e Êa³o¶iÍaÐÅÏ¢ÒÔ±aµ÷ÊÔºÍÐÔÄÜ*ÖÎo

-z µ÷ÈeZendÀ(C)Õ¹Îļþ

-i phpµÄÏa¹ØÐÅÏ¢

-h help±¾Éi¡£

1.ÓÃphp -q ÎļþÃu.php *½Ê½°Ñphp³ÌÐoµ±shell³ÌÐoÀ´Óã¬

2.Óà -s°Ñ×Ô¼ºµÄphp³ÌÐohtml»¯¡£ÕaÑuÊDz»ÊǺÜÊ¡ÐÄ£¿

3.ÀuÓÃphpµÄodbc¹¦ÄÜ¿ÉÒÔÔÚshellÃuÁiÖжÔÊý¾Ý¿a½øÐвÙ×÷¡£

¼¸¸o³£ÓÃÃuÁi
1¡¢ ²e¿´phpµÄ°ae±¾¡¢ÅaÖÃ

ÔÚÃuÁiÐÐÖÐÊaÈephp ¨Cv ¼´¿É²e¿´µ±Ç°phpµÄ°ae±¾¡£


     PHP 5.2.17(cli) (built: Feb 2 2011 11:19:21) 
     Copyright (c) 1997-2010 The PHP Group 
     Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies 
     with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies 
     with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator 

ÆaËuµÄÑ¡ÏiÓУº ¨Cm¡¢-i¡£±ÊÕßÔÚÕaÀi¾Í²»¸ø³oÁÐ×ÓÁË¡£

-m »aÏÔʾµ±Ç°php¼ÓÔصÄÓÐЧģ¿e¡£

-i ÔoÊa³oÎÞhtml¸ñʽµÄphpinfo¡£

ʹÓà ¨Cini Ñ¡Ïi¿ÉÒÔÊa³oµ±Ç°php¼ÓÔØiniÅaÖÃÎļþµÄÊýÁ¿¡¢Â*¾¶ÐÅÏ¢¡£


    php--ini-in-shell

2¡¢ ÔÚÃuÁiÐÐÖÐÔËÐÐphp³ÌÐo

´ÓÃuÁiÐÐÔËÐÐphpdz£¼oµ¥¡£µ«ÓÐÐ(C)×¢ÒaÊÂÏiÐeÒª¸÷λÁ˽aÏ¡£ÖiÈç$_SESSIONÖ®ÀaµÄþÎñÆ÷±aÁ¿ÊÇÎÞ¨ÔÚÃuÁiÐÐÖÐʹÓõģ¬ÆaËu´uÂeµÄÔËÐÐÔoºÍwebþÎñÆ÷ÖÐÍeÈ«Ò»Ñu^_^¡£


     <?php 
     echo ¡°ÔËÐÐphpÃuÁiÐÐecho¡±; 
     ?> 

°ÑÉÏÃaeµÄ´uÂeÁi´aeΪhello.php ¡£ÔÚÃuÁiÐÐÖÐÇÃÈe php ¨Cf hello.php¡£ÏÔʾ½a¹uÈçÏ£º


    ÔËÐÐphpÃuÁiÐÐecho

ÔÚÃuÁiÐÐÖÐÖ´ÐÐphpÎļþµÄºÃ´¦Ö®Ò»¾ÍÊÇ¿ÉÒÔͨ¹ý½Å±¾ÊµÏÖÒ»Ð(C)¼Æ»®ÈÎÎñµÄÖ´ÐС£¶øÎaÐeͨ¹ýweb*þÎñÆ÷^_^¡£

µ±È»£¬ÎÒÃÇÒ²¿ÉÒÔÖ±½ÓÔÚphpÖе÷ÊÔ´uÂe£ºÊaÈephp ¨Cr Ö¸Ái£¬»a³oÏÖÒ»¸o¡±>¡±*uºÅ¡£Õa±iʾÒѾ­½øÈeµ½phpµÄshellÖУ¬¿ÉÒÔÖ±½Óд´uÂe£¬²¢Ö´ÐС£


     -bash-3.2$ php -r ' 
     > for($i=0;$i<2;$i++){ 
     > echo "Number: {$i}\n"; 
     > } 
     > ' 
     Number: 0 
     Number: 1 

»¹¿ÉÒÔʹÓÃphp ¨Ca ÃuÁi´o¿ª½»»¥Ä£Ê½£¬ÊaÈeÒ»ÐдuÂe£¬php»aʵʱÊa³o½a¹u¡£

*3¡¢ ¼i²aphpÓi¨¡¢¸ßÁÁÊa³o**

²»ÓÃÖ´ÐдuÂe£¬ÎÒÃÇ¿ÉÒÔÔÚÃuÁiÐÐϼi²aphpÎļþµÄÓi*¨´iÎo¡£


     -bash-3.2$ php -l hello.php 
No syntax errors detected in hello.php 

³ÌÐoÔ±¾­³£»aÐeÒª½«php´uÂe¸ßÁÁÔ­ÑuÊa³o£¬Ê¹ÓÃphp ¨Cs ¼´¿É


     -bash-3.2$ php -s hello.php 

     <code><span style="color: #000000"> 
     <span style="color: #0000BB"><?php<br /></span> 
     <span style="color: #007700">echo </span> 
     <span style="color: #DD0000">'ddd'</span> 
     <span style="color: #007700">;<br /></span><span 
     style="color: #0000BB">?><br /></span> 
     </span> 

4¡¢²e¿´phpÊÖ²a

´Óphp5.1.2¿ªÊ¼£¬³ÌÐoÔ±ÃÇ¿ÉÒÔÔÚphpÃuÁiÐÐϲe¿´ÊÖ²aÁË£¬ÊaÈephp ¨Crf function¡£»a´oÓ¡³o¸Ãº¯ÊýµÄÓi*¨¼o½e


     -bash-3.2$ php --rf strip_tags 

      Function [ <internal:standard> function strip_tags ] { 

      - Parameters [2] { 
      Parameter #0 [ <required> $str ] 
      Parameter #1 [ <optional> $allowable_tags ] 
      } 
      } 

 相关文章:
PHP分页显示制作详细讲解
SSH 登录失败:Host key verification failed
获取IMSI
将二进制数据转为16进制以便显示
获取IMEI
文件下载
贪吃蛇
双位运算符
PHP自定义函数获取搜索引擎来源关键字的方法
Java生成UUID
发送邮件
年的日历图
提取后缀名
在Zeus Web Server中安装PHP语言支持
让你成为最历害的git提交人
Yii2汉字转拼音类的实例代码
再谈PHP中单双引号的区别详解
指定应用ID以获取对应的应用名称
Python 2与Python 3版本和编码的对比
php封装的page分页类完整实例