phpÒýÓÃÎļþ·½Ê½
ÒýÓÃÎļþµÄ·½·¨ÓÐ2ÖÖ£º
1¡¢require
require("conn.php"); Ò»°ã·ÅÔÚÒ³ÃæµÄµÚÒ»ÐУ¬×öΪ¸ÃÒ³Ö´ÐеÄÒ»²¿·Ö£¬Ê×ÏÈÖ´ÐÐrequireÄÚµÄconn.php È»ºóÔÙÖ´ÐÐÏÂÃæµÄ´úÂë
2¡¢include
include("header.php");µ±³ÌÐòµ½´ïÕâÀïµÄʱºò²Å»áÖ´ÐÐincludeµÄ header.php
Ïà¹ØÎĵµ£º
1¡¢$_SERVER['SCRIPT_NAME']¡¢$_SERVER['PHP_SELF']ºÍ$_SERVER['REQUEST_URI']Çø±ð
Àý×Ó:http://localhost/phpwind75/test.php/%22%3E%3Cscript%3Ealert(’xss’)%3C/script%3E%3Cfoo
$_SERVER['SCRIPT_NAME']Ö»»ñÈ¡½Å±¾Ãû£¬²»»ñÈ¡²ÎÊý,Êä³ö½á¹ûΪ:test.php;
$_SERVER['PHP_SELF']»ñÈ¡½Å±¾Ãûºó£¬Í¬Ê±»ñÈ ......
±¾½Ì³Ì²ÉÓõÄÊÇxampp×Ô´øµÄtomcat²å¼þÀ´Íê³ÉÕûºÏµÄ£¬ËùÒÔ£¬ÒªÏëÍê³ÉÕûºÏ£¬µÚÒ»²½²»ÐèÏÂÔØxampp£¬¼°Æätomcat²å¼þ~
1.´ò¿ªxampp¹ÙÍø µã´Ëxampp¹ÙÍø´ò¿ª
&n ......
ÎÞÒâ¼ä¿´µ½ÒÔÇ°·¢µÄÌû×Ó.»ØÒäÆðÄÇЩPHPµÄÈÕÈÕÒ¹Ò¹
http://www.phpfans.net/ask/discuss2/343326196.html
<?
class gzg//¸ÆÖиÆÀà
{
var $x;//ÊôÐÔ
function gzg()//¹¹Ô캯Êý,ĬÈϲ»³Ô¸ÆÖиÆ
&n ......
//´´½¨Îļþ¼ÐµÄ·½·¨
//$path ΪÎļþ¼Ð²ÎÊý£¬Èç £¨c:/program files/makedir£©
function createFolders($path) {
if (!file_exists($path)) {
$this->createFolders(dirname($path));
mkdir($path, 0777);
&n ......
<?
$_mysqlhost="localhost";
$_mysqluser="root";
$_mysqlpass="";
$_mysqldata="mydata";
$_connect=mysql_connect($_mysqlhost,$_mysqluser,$_mysqlpass) or die ("´íÎó".mysql_error());
mysql_query("SET character_set_connection=utf8, character_set_results=utf8, character_set_client=binary", $ ......