编程语言
首页 > 编程语言> > php – MacOsX Sierra上的ini文件在哪里?

php – MacOsX Sierra上的ini文件在哪里?

作者:互联网

我刚买了新的MacBook Pro.看一下php -i | grep ini返回:

prompt> php -i | grep ini
Configuration File (php.ini) Path => /etc
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
Supported handlers => ndbm cdb cdb_make inifile flatfile
init_command_executed_count => 0
init_command_failed_count => 0
com_init_db => 0
Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException
open sourced by => Epinions.com

这就是我运行php –ini时会发生的事情

prompt> $php --ini
Configuration File (php.ini) Path: /etc
Loaded Configuration File:         (none)
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)

似乎当前的php没有加载任何php.ini文件.可能吗?

解决方法:

当前版本的Mac OS X不附带php.ini. PHP对所有设置使用内部默认值.

/etc/php.ini.default上安装了一个示例配置文件.如果需要自定义PHP设置,可以使用该文件作为模板在/etc/php.ini中创建配置文件. PHP将读取该文件中的设置(如果存在).

标签:macos-sierra,php
来源: https://codeday.me/bug/20191005/1856379.html