简体   繁体   English

Laravel Homestead-配置php.ini文件

[英]Laravel Homestead - configure php.ini file

I'm on Windows10 我在Windows10上

So Laravel Homestead uses its own php installation, right. 所以Laravel Homestead使用自己的php安装,对。 So what's the path to the php.ini file then? 那么,php.ini文件的路径是什么? Can I access it via the file explorer or? 我可以通过文件浏览器访问它吗?

Homestead uses Vagrant to create a virtual machine of Ubuntu 18, Nginx, etc. The php configuration is within the virtual machine, not the Windows 10 file system. Homestead使用Vagrant创建Ubuntu 18,Nginx等的虚拟机。php配置在虚拟机中,而不是Windows 10文件系统中。 You'll wanna ssh into your virtual machine, php settings can be found in /etc/php/7.* 您想通过SSH进入虚拟机,可以在/ /etc/php/7.* php / 7中找到php设置。*

Yes, you are right. 是的,你是对的。 So inside gitBash: 因此在gitBash内部:

  1. vagrant ssh 流浪的SSH
  2. cd /etc/php/7.2/fpm cd /etc/php/7.2/fpm
  3. vi php.ini vi php.ini

It is a little off-topic and not really what you asking for, but you can overwrite your php files via ini_set. 它有点偏离主题,并不是您真正想要的,但是您可以通过ini_set覆盖您的php文件。 Just think of it, at the end your live (clients) server might require a php.ini override. 试想一下,最后,您的活动(客户端)服务器可能需要php.ini覆盖。 And you cannot change the server configuration file. 并且您不能更改服务器配置文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM