易截截图软件、单文件、免安装、纯绿色、仅160KB

JS 和PHP 数据库操作在一个页面

  <?   
  require   ("config.php3");   
  ?>   
  <?   
  if($submit)   
  {   
  //echo   $action;   
    
  //if($action=='update')   
  if($id)   
  {   
    
  $query="update   banner_place   set   adv_plc='$adv_plc',size='$size',description='$description'   where   id=$id";   
    
        $message="update   banner   place   ";   
    
  }   
    
  else     
  {   
  $query="insert   into   banner_place   (adv_plc,size,description)   values   ('$adv_plc','$size','$description')";   
        $message="added   banner   place   "   ;   
      
    }   
        
        $my_res   =   mysql_db_query($phpAds_db,   $query)   or   mysql_die();   
        
    
              //       Header("Location:   banner.php3?pageid=$pageid&message=".urlencode($message));  
                //       Header("Location:   banner.php3");   
  echo   "<script>window.location.href   ='admin.php3?pageid=$pageid&message=$message'</script>";   
    
  exit();   
    }   
          
          ?>   
    
  <?   


相关文档:

php 访问控制

 <?php
// An array of allowed users and their passwords
$users = array(
'harryf' => 'secret',
'tom' => 'mypwd'
);
// If there's no Authentication header, exit
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('HTTP/1.1 401 Unauthorized');
header('WWW-Authenticate: Basic real ......

PHP框架CodeIgniter的数据库操作整理


1.
$query = $this->db->query('SELECT name, title, email from my_table');
foreach ($query->result() as $row)
{
    echo $row->title;
    echo $row->name;
    echo $row->email;
}
2.
foreach ($query->result_array() as $row)
{ ......

配置php自带的mail功能

       之前弄php的时候,需要录制屏幕,就是用php自带的email函数发信,因为没有自己弄过smtp的 服务器,网上提供的smtp服务器都是需要使用密码认证 的,偏偏php内置的函数就没有提供身份认证,也就导致了必须需要在自己的电脑搭建一个可以自主发信的mail服务器!
    然后 ......

PHP读取BMP格式图片的函数

PHP中居然没有读取BMP格式图片的函数,还好高人已经写好一个,我没看代码,反正能正常使用.
imagecreatefrombmp -- 从 BMP 文件或 URL 新建一图像
function imagecreatefrombmp($file)
{
global $CurrentBit, $echoMode;
$f=fopen($file,"r");
$Header=fread($f,2);
if($Header=="BM" ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号