phpdbg,如何安装?

时间:2017-04-09 20:54:50

标签: php phpdbg

对于所有的专家来说,这可能听起来像一个平凡的问题,我真的需要调试我的PHP代码,基本上我想测试我的网站的逻辑流程,其中一部分是PHP。

我已经下载了" krakjoe-phpdbg-v0.4.0-0-gc8d8e85(1)"来自github

请有人为我说明下面的命令,

from numpy import *
from pylab import *
from PIL import Image
from PIL import ImageOps


def grayscale(picture):
    res = Image.new(picture.mode, picture.size)
    red = '150,45,45'                    # for now I'm just tyring
    x = red.split(",")                   # to change pixels with R value less than 150 
                                         #and G/B values greater than 45
    width, height = picture.size         #to greyscale 

   for i in range(0, width):
       for j in range(0, height):
           pixel = picture.getpixel((i, j))  #get a pixel
           pixelStr = str(pixel)
           pixelStr = pixelStr.replace('(', '').replace(')', '')
           pixelStr.split(",")                 #remove parentheses and split so we 
                                               #can convert the pixel into 3 integers


           #if its not specifically in the range of values we're trying to convert
           #we place the original pixel otherwise we convert the pixel to grayscale

           if not (int(pixelStr[0]) >= int(x[0]) and int(pixelStr[1]) <= int(x[1]) and int(pixelStr[2]) <= int(x[2])):
              avg = (pixel[0] + pixel[1] + pixel[2]) / 3
              res.putpixel((i, j), (int(avg), int(avg), int(avg)))
           else:
              res.putpixel(pixel)
return res

请指出简单的说明

1 个答案:

答案 0 :(得分:-3)

你可以在php代码中添加debug_print_backtrace。更多信息:http://php.net/manual/en/function.debug-print-backtrace.php