zoukankan      html  css  js  c++  java
  • PHP学习笔记(二)

    php日志

    (1)使用echo ,简单输出
    (2)使用print_r(),可以有规则的打印复杂结构
    (3)var_dump递归输出某种结构体
    (4)print(),简单打印
    可以将你要输出的错误内容放到上述语句或函数内进行打印输出;也可以写入某个文件,作为你的Log日志:file_put_contents('/test1.txt',$value['value'],FILE_APPEND)等这类文件函数
    以上是我自己工作中总结的PHP调试方法,挺好用的。
     

    去除ECLIPSE warning

    错误发生的行上加一句.
    @SuppressWarnings("unchecked")
     

    只包含一次

    require_once('cmd_php4/Command.php');

    记录错误

  • trigger_error("Cannot find $path", E_USER_ERROR);

    使用函数外的变量

    global $mytext;
    $mytext=”nihao”;
    function chao_echo(){
    echo $GLOBALS['mytext'];
    }
    chao_echo()

     

    php中,函数内引用函数外的变量三种方法:

    1.函数外global声明,函数内使用$GLOBALS数组引用。

    2.函数内global声明,函数内$GLOBALS数组或者直接引用。

    3.在调用函数的时候用一个参数传递。

     

    DIV如何垂直排列?

  • http://www.divcss5.com/wenji/w472.shtml

  • float:left right none inherit;

  • display:inline;

  • autoit下载地址:

    https://www.autoitscript.com/files/autoit3/autoit-v3-setup.exe

查看全文
  • 相关阅读:
    线程,协程
    python魔法方法详解
    Sorted方法排序用法
    time模块
    Haroopad安装与配置: Linux系统下最好用的Markdown编辑器
    C++ Primer第五版答案
    Ubuntu14.04安装有道词典(openyoudao)
    Ubuntu14.04下Sublime Text 3解决无法输入中文
    OpenLTE安装教程
    GNU Radio: Overview of the GNU Radio Scheduler
  • 原文地址:https://www.cnblogs.com/zhang-pengcheng/p/4055595.html
  • Copyright © 2011-2022 走看看