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

[php]how to confirm deleting without using form.

<html>
<head>
<script type="text/javascript">
<!--
function confirmDelete()
{
    return confirm("Are you sure you wish to delete this entry?");
}   
//-->
</script>
</head>
<body>
<% $var1 = 2;%>
<a href="?action=delete&id=<?=$var1?>" onclick="return confirmDelete();">
    Delete this entry
</a>
</body>
</html> 
B
TW:
Line 14 is using PHP's short_open_tag which is not recommended, the formal tag should be <%php %>
Line 15 is using ASP-style <% %> tags.
Of couse you can use the PHP formal tag, the above code is simply to demostrate the other two tags. 
To enable short_open_tag and "<?" support in php, you need to modify php.ini, make sure enable below two attributes.
; Default Value: On
; Development Value: Off
; Production Value: Off
; http://php.net/short-open-tag
short_open_tag = On
; Allow ASP-style <% %> tags.
; http://php.net/asp-tags
asp_tags = On


Ïà¹ØÎĵµ£º

iptables + php ÉÏÍø¼Æ·ÑʵÏÖ

×î½üÓÐÒ»¸öÏã¸ÛµÄ¾ÆµêÌá³öÐèÇó,Òªµ½¾ÆµêÒµÄÚµÄÉÌÎñÖÐÐÄʵÐмƷÑÉÏÍø, ÌṩÁËÈçϼ¼Êõ·½°¸:
1¡¢Éèһ̨CENTOS5µÄ»úÆ÷×öΪ·ÓÉ£¬°ÑÐèÒª¼Æ·ÑµÄ»úÆ÷¶¼ÉèΪÓô˷þÎñÆ÷×öÍø¹Ø¡£
2¡¢·þÎñÆ÷¿ªÆôIPTABLE£¬Í¨¹ýIPTABLE¿ØÖÆÄܲ»ÄÜʹÓû¥ÁªÍø¡£
¼Ç¼ÏÂÒÔϼ¼ÊõÒªµã:
Ò»¡¢ php¿ÉÒÔͨ¹ýshell_execÀ´Ö´ÐÐshellÖ¸Áµ«iptablesµÄÖ¸ÁîÊÇr ......

php ¶Ô¹óÎļþ¼Ð¼°ÄÚ²¿Îļþ¼ÐÄÚÈÝ

function file_list($path) {
$handle = opendir($path);
if ($handle) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
if (is_dir($path."/".$file)) {
echo "<br /><br /><b> ......

php ÉÏ´«Îļþ

//×îºÃÏȽ¨Á¢Ò»¸ö upload/publicÕâ¸öÎļþ¼Ð£¬ÒÔÏÂÊÇupload.php
<?php
/**
*********************************************
²ÎÊýÉ趨
*********************************************
**/
//×î´óÉÏ´«Îļþ´óС
$MAX_SIZE = 20000000;
//ÉèÖÃMineÀàÐÍ
$FILE_MIMES = array
('image/jpeg','image/jpg','image/gif ......

PhpÅжÏÓû§Í¨¹ýÊÖ»ú·ÃÎÊwap»¹ÊǵçÄÔÖ±½Ó·ÃÎÊ

Ê×ÏÈ˵×î¸ù±¾µÄ½â¾ö·½·¨£º
ÊÖ »ú·ÃÎÊʱ£¬»á¸½´ø·¢ËÍuser-agentÐÅÏ¢£¬Õâ¸öÐÅÏ¢ÀïÃæ»áÓÐÊÖ»úºÅÂëÐÅÏ¢£¬ÄÇôÈç¹ûÄÜÈ¡µÃÊÖ»úºÅÂ룬Ôò¿ÉÒԿ϶¨ÊÇͨ¹ýÊÖ»úwap·ÃÎʵġ£µ«ÊÇÄ¿Ç°ÖÐ ¹úÒƶ¯ÒѾ­ÆÁ±ÎÁËuser-agentÐÅÏ¢£¬ËùÒÔ»ñÈ¡²»µ½ÊÖ»úºÅÂë¡£ÓйØϵµÄÅóÓÑ¿ÉÒÔÁªÏµÒƶ¯¹«Ë¾£¬°ÑwapÍøÕ¾·þÎñÆ÷µÄipÌá½»¸øÖйúÒƶ¯£¬¼ÓÈë°×Ãûµ¥ ºó¼´¿ÉÈ¡µ ......

PHPÖÐÄÚ²¿º¯ÊýʹÓ÷½·¨

<?php
 
 
  //»ñµÃϵͳʱ¼äº¯Êý(×¢Òâ²ÎÊýÖдóдY´ú±íÍêÕûÄê·Ý£¬Ð¡Ð´y´ú±íÄê·Ý¼òд)
  $sum = date("Y-m-d");
  $sum1 = date("y-m-d");
 
  echo "$sum<br/>";
  echo "$sum1<br/>";
 
  //md5¼ÓÃܺ¯Êý
  $pass = md5("ÕÅÈý");
  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ