解析和验证PHP脚本的工具? [英] Tool to parse and validate PHP script?

查看:62
本文介绍了解析和验证PHP脚本的工具?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好


Linux / FreeBSD上是否有一个可以解析PHP脚本的工具

确定没有编译时的问题?


我刚注意到我复制/粘贴了一些代码,这些代码的行更长,

可以放在SSH终端窗口中,这会导致运行 - 时间错误

在/var/log/httpd-error.log中报告但在浏览器中没有:


[错误] PHP注意:未定义的索引:etabssemen在第49行上的
/usr/local/www/apache22/data/prospect.php,引用:
http://server/myscript.php


谢谢。

Hello

Is there a tool on Linux/FreeBSD that can parse a PHP script to make
sure there''s no compile-time issues?

I just noticed that I copy/pasted some code that had lines longer that
can fit in the SSH terminal window, and that caused a run-time error
as reported in the /var/log/httpd-error.log but not in the browser:

[error] PHP Notice: Undefined index: etablissemen\nt in
/usr/local/www/apache22/data/prospect.php on line 49, referer:
http://server/myscript.php

Thank you.

推荐答案

Gilles Ganault写道:
Gilles Ganault wrote:

Linux / FreeBSD上是否有可以解析PHP脚本的工具

确定没有编译时问题?


我刚注意到我复制/粘贴了一些代码如果有更长的行,那么

可以放在SSH终端窗口中,这会导致运行时错误

,如/ var / log / httpd-error中所报告的那样。登录但不在浏览器中:


[错误] PHP注意:未定义索引:etablissemen\ n

/ usr / local / www / apache22 /第49行的data / prospect.php,参考文献:
http://server/myscript.php



你可以运行''php -l thescript.php'来进行语法检查,但是你的

错误不会被捕获通过这个:这是一个运行时错误,只有通过实际运行脚本才能获得



当然,在实时网站上错误不应该显示,但记录了,显然是

完成了她。

-

Rik Wasmus

You can run ''php -l thescript.php'' to do a syntax check, however your
error would not be catched by that: this is a run time error, and only
catchable by actually running the script.

Of course, on live websites error should not be shown, but logged, as is
done her apparently.
--
Rik Wasmus


5月8日上午9:06,Rik Wasmus< luiheidsgoe ... @ hotmail.comwrote:
On May 8, 9:06 am, Rik Wasmus <luiheidsgoe...@hotmail.comwrote:

Gilles Ganault写道:
Gilles Ganault wrote:

Linux / FreeBSD上是否有一个可以解析PHP脚本的工具

确定没有编译时间问题?
Is there a tool on Linux/FreeBSD that can parse a PHP script to make
sure there''s no compile-time issues?


我刚注意到我复制/粘贴了一些代码,这些代码的行更长,

可以放在SSH终端窗口中,这导致了/var/log/httpd-error.log中报告的运行时错误

,但没有在浏览器中报告:
I just noticed that I copy/pasted some code that had lines longer that
can fit in the SSH terminal window, and that caused a run-time error
as reported in the /var/log/httpd-error.log but not in the browser:


[错误] PHP注意:未定义的索引:etablissemen\ n在第49行的
/usr/local/www/apache22/data/prospect.php,引用:
http://server/myscript.php



您可以运行''php -l thescript.php'来进行语法检查,但是您的

错误不会被捕获:这是运行时错误,只有

通过实际运行脚本来捕获。


当然,在实时网站上的错误不应该显示,而是记录,因为

显然完成了她。

-

Rik Wasmus


You can run ''php -l thescript.php'' to do a syntax check, however your
error would not be catched by that: this is a run time error, and only
catchable by actually running the script.

Of course, on live websites error should not be shown, but logged, as is
done her apparently.
--
Rik Wasmus



是否有机会通过ftp或sftp转移文件?

Any chance to transfer your file by ftp or sftp?


2008年5月8日星期四06: 14:40 -0700(PDT),ELINTPimp写道:
On Thu, 8 May 2008 06:14:40 -0700 (PDT), ELINTPimp wrote:

> Gilles Ganault写道:
>Gilles Ganault wrote:

Linux / FreeBSD上是否有可以解析PHP脚本的工具

确定没有编译时问题?
Is there a tool on Linux/FreeBSD that can parse a PHP script to make
sure there''s no compile-time issues?


我刚注意到我复制/粘贴了一些代码,这些代码的行更长,

可以放在SSH终端窗口中,这导致了/var/log/httpd-error.log中报告的运行时错误

,但没有在浏览器中报告:
I just noticed that I copy/pasted some code that had lines longer that
can fit in the SSH terminal window, and that caused a run-time error
as reported in the /var/log/httpd-error.log but not in the browser:


[错误] PHP注意:未定义的索引:etablissemen\ n在第49行的
/usr/local/www/apache22/data/prospect.php,引用:
http://server/myscript.php



有机会通过ftp或sftp传输文件吗?


Any chance to transfer your file by ftp or sftp?



或者在编辑器上使用更好的配置....


-

这显然超出了她的范围。到目前为止,她已经超过了她,并且很好地进入芭比领土。

- J. D. Baldwin

Or use a better configuration on the editor....

--
This was, apparently, beyond her ken. So far beyond her ken that she was
well into barbie territory.
-- J. D. Baldwin


这篇关于解析和验证PHP脚本的工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆