Php·¾¶ÎÊÌâ¼°Æä½â¾ö·½·¨
³õѧPHPµÄʱºò£¬ÎÒÃǾ³£±»PHPµÄ¾ø¶Ô·¾¶ºÍÏà¶Ô·¾¶ÅªµÄÔÎͷתÏò¡£Â·¾¶ÎÊÌâ¾³£µ¼ÖÂinclude¼°requireÃüÁî²»ÄܼÓÔØµ½Ö¸¶¨µÄÒ³
Ãæ£¬´Ó¶øµ¼ÖÂWeb³ÌÐòÔËÐдíÎó¡£±¾ÎĽ«¸ú´ó¼ÒÒ»Æð̽ÌÖÒ»ÏÂPHP·¾¶ÎÊÌâµÄ³£Óýâ¾ö·½°¸¡£
ÏÂÃæÎÒÃÇÏÈ×öÒ»¸ö¸ö¼òµ¥µÄʾÀý:
ÉÏͼÊÇÒ»¸ö¼òµ¥WebÏîÄ¿µÄ½á¹¹Í¼,ÆäÖи÷ÎļþµÄ´úÂëÈçÏÂ:
root/index.php :
<?php
require_once ‘app/blog.php’;
$blog=new Blog();
echo $blog->GetBlogInfo();
?>
root/app/blog.php :[/B]
<?php
require_once ‘../lib/smarty/functions.php’;
?>
<?php
class Blog
{
public function GetBlogInfo()
{
return ‘This is a test of blog!’;
}
}
?>
<?php
echo ‘root/app/blog.php loaded successed!</br>’;
?>
Ê×ÏÈ,ÎÒÃÇ´Óä¯ÀÀÆ÷ÀïÖ±½ÓÊäÈëhttp://localhost/root/app/blog.php,ä¯ÀÀÆ÷ÏÔʾ£º
———————————————————————-
root/app/blog.php loaded successed!
———————————————————————-
Îļþ¼ÓÔØ³É¹¦£¬Ã»·¢ÉúÈκξ¯¸æ»ò´íÎó¡£
½ÓÏÂÀ´£¬ÎÒÃÇÔÚä¯ÀÀÆ÷ÖÐÇëÇóÈçÏÂÍøÕ¾£ºhttp://localhost/root/index.php,ä¯ÀÀÆ÷ÏÔʾ³öÈçÏ´íÎóÐÅ
Ï¢:
———————————————————————————
Warning: require_once(../lib/smarty/functions.php)
[function.require-once]: failed to open stream: No such file or
directory in T:\Study\PHP_REL\Projects\root\app\blog.php on line 2
Fatal error: require_once() [function.require]: Failed opening
required &l
Ïà¹ØÎĵµ£º
ÎÞÂÛÄÄÖÖÓïÑÔ£¬×Ö·û´®²Ù×÷¶¼ÊÇÒ»¸öÖØÒªµÄ»ù´¡£¬ÍùÍùÊǼòµ¥¶øÖØÒª¡£ÕýÏñÈË˵»°Ò»Ñù£¬Ò»°ãÓÐÐÎÌ壨ͼÐνçÃæ£©£¬ÓÐÓïÑÔ£¨print ×Ö·û´®£¿£©£¬ÏÔÈ»×Ö·û´®ÄܽâÊ͸ü¶àµÄ¶«Î÷¡£PHPÌṩÁË´óÁ¿µÄ×Ö·û´®²Ù×÷º¯Êý£¬¹¦ÄÜÇ¿´ó£¬Ê¹ÓÃÒ²±È½Ï¼òµ¥£¬ÏêϸÇë²Î¿´ http://cn2.php.net/manual/zh/ref.strings.php . ÒÔϽ«¼òµ¥µÄ½²ÊöËüµÄ¹¦ÄܺÍÌØÐ ......
I’ve just updated Aptana Studio from 1.5 to 2.0 only to find out that the spectacular Aptana PHP plugin is not longer supported and its installation has been removed from the Install Additional Features view. However, with some tricks we can still install the old Aptana 1.5.1 in order to use i ......
±±¾©´óѧPHP¹¤³Ìʦ°àÕÐÉú¼òÕÂ
꿅᣼www.pku-it.com
½üÄêÀ´£¬PHPÓïÑÔÒÔÆä¼ò½àÁé»îµÄ±à³Ìģʽ¡¢ÈÕÇ÷ÍêÉÆµÄ¼¼ÊõÌåϵÒÔ¼°Ç¿ÓÐÁ¦µÄ¿ªÔ´Ö§³Ö£¬Ñ¸ËÙ·¢Õ¹³ÉΪȫÇò»¥ÁªÍøÓ¦ÓÃ×îΪ¹ã·ºµÄ±à³ÌÓïÑÔ¡£Ä¿Ç°ÒÑÓг¬¹ý40%µÄWEB³ÌÐòʹÓÃPHPÀ´±àд£¬°Ù¶È¡¢ÌÚÑ ......
ÖªµÀ²î¾àÁË£¬Å¬Á¦°É£¡
1. Which of the following will not add john to the users array?
1. $users[] = 'john';
2. array_add($users,'john');
3. array_push($users,'john');
4. $users ||= 'john';
2. What's the difference between sort(), asort() and ksort? Under what circumstances would you use each o ......
from£ºhttp://www.xland.com.cn/article/7/81/0804/28778.htm
±¾ÀàʵÏÖ£º
Êý¾Ý¿âÐÅÏ¢µ¼³ö£ºword£¬excel£¬json£¬xml£¬sql
Êý¾Ý¿â»Ö¸´£º´Ósql£¬´ÓÎļþ
¾ßÌåÓ÷¨:
Ê×ÏÈн¨²âÊÔÓÃÊý¾Ý¿âmytest£¬È»ºóÔÚÀïÃæ½¨Õűí
PHP´úÂë:
ÒÔÏÂÊÇ´úÂëÆ¬¶Î£º
--
-- ±íµÄ½á¹¹ `test`
--
CREATE TABLE `test` (
`id ......