1、启动报错
修改
#DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs"
DocumentRoot "/Users/wangwei/Documents/php/myphp”
报错:
estarting Apache Web Server...
Exit code: 8
Stdout:
apache config test fails, aborting
apache config test fails, aborting
Stderr:
AH00526: Syntax error on line 230 of /Applications/XAMPP/xamppfiles/etc/httpd.conf:
DocumentRoot must be a directory
AH00526: Syntax error on line 230 of /Applications/XAMPP/xamppfiles/etc/httpd.conf:
DocumentRoot must be a directory
是因为引号输入错误导致,修改为DocumentRoot "/Users/wangwei/Documents/php/myphp"就ok了
2、关于中文乱码,
我用win7+eclipse做为IDE工具,修改字符编码的方法为window->preferences->General->Workspace->Text file encoding选other,选中utf-8
3、调用同一类中的某个类的方法,通过$this->来实现。
function a1(){
}
function a2(){
$this->a1();
}