php-学习笔记(整理)

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();

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值