Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

php »ù´¡±Ê¼Ç string

/***************************by
garcon1986********************************/
<?php
// example for strings, single quoted, double quoted
echo 'display a string!<br>';
echo ' this displays
a splitted
string<br>';
echo 'i\'ll be "back"<br>';
echo 'she said:"i\'ll be back!"<br>';
echo 'the path is c:\programmes\sjg\*.*!'.'            '.'hello world<br>';
echo 'the path is c:\\prgralles\\sjg\*.*<p>';
$h = 'hellos';
$i = "hellos";
echo '$h<br>';
echo "$h"."<br>";
echo '$i<br>';
echo "$i<br>";
//heredoc example
$str = <<<EOD
Example of string
spanning multiple lines
using heredoc syntax.
EOD;
/* More complex example, with variables. */
class foo
{
var $foo;
var $bar;
function foo()
{
$this->foo = 'Foo';
$this->bar = array('Bar1', 'Bar2', 'Bar3');
}
}
$foo = new foo();
$name = 'MyName';
echo <<<EOT
My name is "$name". I am printing some $foo->foo.
Now, I am printing some {$foo->bar[1]}.
This should print a capital 'A': \x41
EOT;
echo '$str<br>';
echo "$str<p>";
// variable parsing
$beer = "xuehua";
echo "$beer's taste is good<br>";// works; "'" is an invalid character for variable names
echo "he drinks some $beers<br>";// won't work; 's' is a valid character for variable names but the variable is "$beer
echo "he drinks some ${beer}s<br>";//works
echo "he drinks some {$beer}s<br>";//works
error_reporting(E_ALL);
$fruits = array('strawberry' => 'red', 'banana' => 'yellow');
echo "A banana is $fruits[banana].<br>";
echo "A banana is {$fruits['banana']}.<br>";
echo "A banana is {$fruits[banana]}.<br>"; // Works but PHP looks for a constant named


Ïà¹ØÎĵµ£º

PHPº¯ÊýµÄ¶¨ÒåÓëʹÓÃ

Ô­ÎÄÁ´½Ó£ºhttp://www.phpdo.net/index.php/2010/02/10/1-13/
PHPÖÐÒ»¸ö»ù±¾µÄ½Å±¾ÓÉÁ½²¿·Ö×é³É£ºÖ÷³ÌÐòºÍº¯Êý¡£
º¯Êý²»½ö¿ÉÒÔ¹¹³ÉÒ»¸öPHP½Å±¾µÄ»ù±¾¹¦ÄÜ£¬Ò²Ê¹µÃ³ÌÐò½á¹¹»¯£¬ÓÐÖúÓÚ³ÌÐò´úÂëµÄÖØÓá£
PHPº¯ÊýµÄµ÷ÓÃ
ͨ¹ý°´ÕÕº¯Êý¸ñʽд³öº¯ÊýÒÔ¼°ÏàÓ¦µÄ²ÎÊý¼´¿É£¬ÒÂÓï·¨ÈçÏ£º
String¡¡substr(string¡¡str,int¡¡start) ......

PHP»·¾³ IIS+PHP+MYSQL»·¾³µÄ¼ÜÉè

ºÜ¾ÃûÓÐЩһЩÓÐÓô¦µÄµÄ¶«Î÷ÁË£¡½ñÌì¾Í²»ºúÂÒµÄд¶«Î÷ÁË!дһЩÓÐÓõ졵±È»Ç°ÌáÏÂÊǺܸÐлºÜ¶à¾­³£À´ÎÒ²©¿ÍµÄÅóÓÑһϣ¡¶àл´ó¼Ò£¡£¡£¡£¡£¡
½ñÌìдµÄÊǹØÓÚphp»·¾³¼ÜÉèµÄµÚÒ»ÖÖ·½Ê½£¡µ±È»ÎҾͲ»½ØÍ¼ÁË£¡´ó¼ÒÖ»Òª°´ÕÕ²Ù×÷¾Í¿ÉÒÔʵÏֵģ¡
Ò»¡¢°²×° PHP £º±¾ÎÄPHP°²×°Â·¾¶È¡ÎªD:\php\php4\(Ϊ±Ü»ìÏý£¬PHP5.1.x°æ±¾°²×°Â·¾ ......

Nginx + PHP + Mysql (php frm 방식)


Nginx + PHP + Mysql (php-frm 방식)

 글쓴이 :
최고관리자


조회 : 2,884  

......

php »ù´¡±Ê¼Ç variables

/***************************by
garcon1986********************************/
<?php
// variable name is sensitive
$var = "sjg";
$Var = "wl";
echo $var.' loves '.$Var.'<br>';
echo "$var, $Var<p>";
//naming conventions for variables
//$4site = 'not y ......

php »ù´¡±Ê¼Ç functions

/***************************by
garcon1986********************************/
<?php
//example1
$makefoo = true;
bar();
if($makefoo){
function foo(){
echo "doesn't exist.<br>";
}
}
if($makefoo)foo();
function bar(){
echo "exist<br>";
}
//example2
funct ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ