Home  >  Article  >  Backend Development  >  为什么小弟我通过浏览器能正常访问小弟我的PHP文件,能看到这个PHP文件解析后的正常输出。但是小弟我用PHP CLI

为什么小弟我通过浏览器能正常访问小弟我的PHP文件,能看到这个PHP文件解析后的正常输出。但是小弟我用PHP CLI

WBOY
WBOYOriginal
2016-06-13 10:11:14745browse

为什么我通过浏览器能正常访问我的PHP文件,能看到这个PHP文件解析后的正常输出。但是我用PHP CLI
为什么我通过浏览器能正常访问我的PHP文件,能看到这个PHP文件解析后的正常输出。但是我用PHP CLI在linux下用命令去执行这个php文件时,会提醒php在启动的时候某些某块不匹配什么的,例如*** 20060923 ***20090923

------解决方案--------------------
一般是因为你的命令行环境和web环境所使用的php.ini文件不一致导致出现两种结果.

你可以使用
php -c /custom/directory/php.ini php.php

指定php.ini路径 执行某个php文件.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn