易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

php config

php config
1.安装Apache2.2
2.安装php5.2(注意选择所有的库文件)
3.将phpMyAdmin解压,拷贝至Apache2.2\htdocs\phpmyadmin(该路径可以自由改变)下。
4.修改配置文件:
 1)修改php.ini
  具体操作:
  extension_dir = "C:\Program Files\PHP\ext"  (536)
  extension=php ......

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中foreach遍历数组(2)

<?php
  //声明数组变量
  $arr = array('张三','李四','王五','李明');
 
  //foreach循环遍历数组
  foreach($arr as $value){
   //注意“$value”后必须要一个空格,否则输出的结果不正确
   echo "$value<br/>";
  }
?> ......

PHP中foreach循环遍历数组(3)

<?php
 
  //声明数组变量
  $arr = array(val1 =>'张三',val2 => '李四',val3 => '王五',val4 => '李明',val5 => '周燕妮');
 
  //foreach循环遍历数组
  foreach($arr as $key => $value){
   //注意“$value”后必须要一个空格,否则输 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号