phpÂÒÂëÎÊÌâ
½ñÌìÓöµ½ÁËÒ»¸öºÜÆæ¹ÖµÄÂÒÂëÎÊÌ⣬×Ô¼ºÎÞÒâÖнâ¾öÁË£¬µ«²»ÖªµÀÊÇʲôÔÒò£¬Ö»ºÃ¼ÇÏÂÀ´£¬·ÀÖ¹ÒÔºóÔÙ³öÏÖÕâÑùµÄÎÊÌâ¡£
µ±ÎÒ°ÑphpÓï¾äдµ½ÏÂÃæµÄÒ³ÃæÍ·ÐÅϢ֮ǰµÄʱºò£¬ÕâЩphpÊä³öÓï¾ä¶¼Êä³öµÄÊÇÂÒÂ룬°üÀ¨ÓÃechoÊä³öµÄjs¡£È磺echo "<script languge=javascript> alert('Ìí¼Ó³É¹¦!');location.href = 'device_add.php';</script>";µ¯³öÀ´µÄ“Ìí¼Ó³É¹¦”Ò²±ä³ÉÁËÂÒÂë¡£
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<LINK REL=stylesheet HREF="style.css" type="text/css">
<title>.............</title>
Èç¹û°ÑphpÓï¾ä·Åµ½Ò³ÃæÍ·ÐÅÏ¢Ö®ºó£¬Ôò²»»á³öÏÖÂÒÂëÁË¡£
Ïà¹ØÎĵµ£º
<?php
define('SMARTY_TMP_DIR','C:/php5/Smarty-2.6.13/');
define('SMARTY_DIR','C:/php5/Smarty-2.6.13/libs/'); //SMARTY_DIR ->smarty keyword,must be defined as libs dectory
require_once(SMARTY_DIR.'Smarty.class.php');
//½¨Á¢Ò»¸ösmarty¶ÔÏó
$smarty = new Smarty;
$smarty->template_dir = ......
Code:
<?php
function genRandomString($len)
{
$chars = array(
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k",
"l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v",
"w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G",
"H", "I", "J", "K", "L", "M", "N", "O", ......
<?php
function outputMyName($fname) {
echo "ÎÒµÄÃû×ֽР";
echo "ÖÜ ".$fname."<br />";
}
?>
<html>
<body>
<?php
outputMyName("ʤ³¬");
outputMyName("Óîºã");
outputMyName("ÓîÃË");
?>
</body>
</html>
½á¹ûÈçÏ£ ......
ÖØÒªµÄPHP³¬¼¶È«¾Ö±äÁ¿×ܽá
2008-07-14 16:53:03
¡¡±êÇ©£ºÈ«¾Ö±äÁ¿
¡¡¡¡¡¡[ÍÆË͵½¼¼ÊõȦ
]
PHPÓÐ9¸öÔ¤¶¨Òå±äÁ¿Êý×飬·Ö±ð×ܽáÈçÏ£º
1¡¢$_SERVER
$_SERVER³¬¼¶È«¾Ö±äÁ¿°üº¬ÓÉweb·þÎñÆ÷´´½¨µÄÐÅÏ¢ ......
<?php
if($_POST['str'])
{
header('Content-type: application/doc');
header('Content-Disposition: attachment; filename="downloaded.doc"');
echo iconv("UTF-8","GB2312",$_POST['str']);
}
?>
<a href="javascript:void(0)" onclick="downword()">ÏÂÔØ</a>
<div id="word" style="dis ......