我的PHP工作日志

来源:互联网 发布:如何判断协议数据单元 编辑:程序博客网 时间:2024/05/24 07:29

PHP var_dump() 会返回变量的数据类型和值

var_dump($x);echo "<br>"; $x = -345; // 负数 
int(-345)

===全等(完全相同)$x === $y如果 $x 等于 $y,且它们类型相同,则返回 true。

!==不全等(完全不同)$x !== $y如果 $x 不等于 $y,且它们类型不相同,则返回 true。
关联数组的定义
$x = array("a" => "red", "b" => "green"); $y = array("c" => "blue", "d" => "yellow"); $z = $x + $y; // $x 与 $y 的联合var_dump($z);
array(4) { ["a"]=> string(3) "red" ["b"]=> string(5) "green" ["c"]=> string(4) "blue" ["d"]=> string(6) "yellow" } 

foreach 循环只适用于数组

<?phpfunction setHeight($minheight=50) {  echo "The height is : $minheight <br>";}setHeight(350);

wampserver不能正常启动,可能是因为装了tomcat,修改Apache的httpd.conf(配置文件,改后要重启),我改成了88端口,再访问时要在localhost后加:88(如果是没有修改的默认情况就直接输入localhost就可以)

MySQL默认的账号:root密码:(空)

命令行修改mysqladmin的root密码(直接在MySQL中的user表中修改貌似是不行的)

http://www.360doc.com/content/13/0511/20/11965070_284671723.shtml

修改后要修改MySQL的配置文件,否则登录不上

涉及到inner join的一句超长超详细的话

'SELECT 
`pub_user_right`.`ur_id`,
`pub_user_right`.`mut_id`,
`pub_user_right`.`department_id`,
`module`.`module`,
`module`.`module_name`,
`pub_module_department`.`department_name`,
`gl_department`.`department_name` AS `gl_department_name`, 
`pub_module_user_type`.`depiction`
FROM 
`pub_user_right` 
INNER JOIN `pub_module_user_type` 
ON `pub_user_right`.`mut_id` = `pub_module_user_type`.`mut_id`
INNER JOIN `module`
ON `module`.`module` = `pub_module_user_type`.`module`
LEFT JOIN `pub_module_department` 
ON `pub_user_right`.`department_id` = `pub_module_department`.`department_id`
LEFT JOIN `gl_department` 
ON `pub_user_right`.`department_id` = `gl_department`.`department_id`
WHERE 
`pub_user_right`.`member_id` = ? 
ORDER BY
`module`.`module` ASC';

<>不等于$x <> $y如果 $x 不等于 $y,则返回 true。

sql之left join、right join、inner join的区别

http://www.cnblogs.com/pcjim/articles/799302.html

<span> 标签被用来组合文档中的行内元素。

无序 HTML 列表:<ul>

<li> 标签定义列表项目

data(1);可以用来显示周里的某天

fgets() 函数用于从文件读取单行。

1 0
原创粉丝点击