php jquery ÉÏ´«ÕÕÆ¬,ÉÏ´«ºóʵʱ±¾Ò³ÃæÔ¤ÀÀ
ÆäʵÕâ¸öµÄÖ÷Òª²¿·Ö²¢²»ÊÇÒ»¸öjquery£¬µ«ÊDZØÐëʹÓõ½
php³ÌÐò²¿·Ö£¬Ò²Ö»ÐèÒªÕâ¸öÒ»¸öphp³ÌÐò¾Í¿ÉÒÔÁË
www.corange.cnÇײâ
<?php
header("Content-Type: text/html; charset=utf-8");
@header( "Cache-Control: no-cache, must-revalidate" );
@header( "Pragma: no-cache" );
@header( "Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" );
if($_GET['act']=='upload'){
if($_POST['upload']=='upload'){
$updir ='upload/';
$uploadfile = $uploaddir . basename($_FILES['file']['name']);
$_FILES['file']['name']=strtolower($_FILES['file']['name']);
$tmp_filename=explode(".",$_FILES['file']['name']);
if($tmp_filename[(count($tmp_filename)-1)]=='jpg' || $tmp_filename[(count($tmp_filename)-1)]=='jpeg'){
$up_filename=$updir.md5($_FILES['file']['name'].$_FILES['file']['size']).".".$tmp_filename[(count($tmp_filename)-1)] ;
if(move_uploaded_file($_FILES['file']['tmp_name'],$up_filename)){
list($width, $height, $type, $attr) = getimagesize($up_filename);
$f1="<img src='$up_filename' id='ImageDrag' width='150'>";
echo '<script language="javascript">parent.$("#ImageDragContainer").html("'.$f1.'");</script>';
echo "<script>parent.myform.bigpic.value=''</script>";//ÐÞ¸ÄʱºòÖ±½ÓÌæ»»µôÔÊý¾Ý
echo "<script>parent.myform.bigpic.value+='",$up_filename,",",$width,",",$height,"'</script>";
echo "<script>location.href='?act=upload'</script>";exit;
}else{
echo "<script>alert('ͼƬÉÏ´«Ê§°Ü!');location.href='?act=upload'</script>";exit;
}
}else{
echo "<script>alert('ͼƬÉÏ´«Ê§°Ü,Çë×¢ÒâÉÏ´«¸ñʽ£¬Ö»Ö§³Öjpg¸ñʽͼƬ!');location.href='?act=upload'</script>";exit;
}
}
?>
<body style="padding:0px;margin:0px;">
<div style="margin:0px;padding:0px;font-size:12px;">
<FORM ACTION="?act=upload" METHOD="POST" enctype="multipart/form-data">
<input type="file" name="file" id="file" />
<input type="submit" name="button" id="button" value="ÉÏ´«" />
<
Ïà¹ØÎĵµ£º
sessionµÄ×÷ÓÃÓòÊÇÔÚÒ»´Î»á»°ÖÐÆð×÷Óã¬ËùÒÔÔÚÒ»´Î»á»°ÖУ¬¿ÉÒÔÓÃSessionÀ´´æ´¢±£´æËùÐèÒªµÄÖµ£¬ÈçʵÏÖ¹ºÎï³µ£¬¿Í»§ÊÇ·ñµÇ¼µÄÑéÖ¤µÈµÈ¡£ÔÚʹÓÃǰÊ×ÏÈÒª¿ªÆôsession
<?php
session_start();
?>
¿¼ÂÇÊÇ·ñ¿ÉдÈësession
<?php
if (isset($_POST['userid'])){
$_SESSION[' ......
ÏÖÔÚÎÒÃÇ¿ªÊ¼½éÉÜÐÂÎŵÄÁбíºÍɾ³ýÁË¡£
н¨Á¢Ò»¸öÎļþlistnews.php,ÄÚÈÝÈçÏ£º
< ?php
require_once('../inc/config.php');
//°üº¬ÅäÖÃÎļþ
?>
<html>
<head></head>
<title>ÐÂÎŹÜÀí</title>
<body>
<div class="newstitle"></div>
<div class="ne ......
1. ÈçºÎÓÃphpµÄ»·¾³±äÁ¿µÃµ½Ò»¸öÍøÒ³µØÖ·µÄÄÚÈÝ£¿ipµØÖ·ÓÖÒªÔõÑùµÃµ½£¿
[php]
echo $_SERVER ['PHP_SELF'];
echo $_SERVER ['SERVER_ADDR'];
[/php]
2. ÇóÁ½¸öÈÕÆÚµÄ²îÊý£¬ÀýÈç2007-2-5 ~ 2007-3-6 µÄÈÕÆÚ²îÊý
[php]
$begin=strtotime('2007-2-5');
$end=strtotime('2007-3-6');
echo ($end-$begin)/(24*3600);
[ ......
×òÌìÍíÉÏÒ»Ö±ÔÚ×ÁÄ¥Flex,Ïëͨ¹ýDataGrid°ÑMySQLÀïÃæµÄÊý¾Ý¸ø¶Á³öÀ´£¬ÆÚ¼ä³öÏÖÁ˼¸¸öСÎÊÌ⣬¼Ç¼ÏÂ~~
1.µÚÒ»´Î½øÐÐÁ¬½ÓÊý¾Ý·þÎñ(Data-Connect to Data/Service-PHP-Browse)ʱ,»á³öÏÖ°²×°Zend FrameWork,Ñ¡Ôñok,²»ÒªÊºóÔÙÈ¥ÍøÕ¾ÏÂÔØZendAMF,Õâ¸öÀïÃæ»áÉÙһЩ¶«Î÷.
2.Data-Bind to DataÊ ......
php»ù´¡Ñ§Ï°ÒѾ²î²»¶àÁË,µ«ÊÇΪ¼ìÑé×Ô¼ºµÄÑ§Ï°ÕÆÎÕÇé¿ö,°Ñphp»ù´¡ÖªÊ¶»Ø¹Ë¸´Ï°ÁËÒ»ÏÂ
µÚÒ»¸öPHP³ÌÐò
<?php
echo "Hello World!";
?>
1 ×¢ÊÍ
1.1¶àÐÐ
/*
xxxx
*/
1.2µ¥ÐÐ
//xxxxx
2. ¸³Öµ
$a = 'test';
2.1 ¼ì²é±äÁ¿ÊÇ·ñÒÑÉùÃ÷
isset($a)
2.2 ÊͷűäÁ¿
unset($a);
2.3 ¾² ......