php.ini 文件在 xamp 文件夹中可用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16934487/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 11:55:08  来源:igfitidea点击:

php.ini file is available in xamp folder

phpxampp

提问by Kavita Ahuja

I am new to php and started running small codes in php ..

我是 php 的新手,开始在 php 中运行小代码..

Operating System- Windows Xp service pack 3 Xampp version - 1.7.3 netbeans- 6.5

操作系统 - Windows Xp 服务包 3 Xampp 版本 - 1.7.3 netbeans- 6.5

for small codes such as upload etc are working perfectly, But when I try to send email said error message SMTP related .Then, I started surfing Google about errors , there I come to know about php.ini file in xampp. Different versions have different locations of this file in xampp only.

对于上传等小代码工作正常,但是当我尝试发送电子邮件时说错误消息与 SMTP 相关。然后,我开始在 Google 上浏览有关错误的信息,在那里我了解了 xampp 中的 php.ini 文件。不同版本仅在 xampp 中具有此文件的不同位置。

There are 3 things I noticed...

我注意到了3件事......

1) xampp folder and subfolders does not have php.ini file

1) xampp 文件夹和子文件夹没有php.ini 文件

2) on Running phpconfig()it shows :

2) 在运行phpconfig()时显示:

Configuration File (php.ini) Path no value

配置文件 (php.ini) 路径无值

Loaded Configuration File C:\xampp\php\php.ini

加载的配置文件 C:\xampp\php\php.ini

3)SMTP server is deactivated in xampp Status at localhost/xampp

3) SMTP 服务器在 localhost/xampp 的 xampp 状态中被停用

SMTP Service DEACTIVATED
FTP Service DEACTIVATED

SMTP 服务停用
FTP 服务停用

I can't edit php.ini as its not available what is solution to these problems?

我无法编辑 php.ini,因为它不可用 这些问题的解决方案是什么?

回答by ray

With XAMPP, the php.ini file is called php
Click on the file called php then you will see another folder called php, click on that, this is the php.ini file

使用 XAMPP,php.ini 文件名为 php
点击名为 php的文件,然后你会看到另一个名为 php 的文件夹,点击它,这是 php.ini 文件

回答by Ashwin Hegde

Please have a visit on following page and navigate to configuration files session:

请访问以下页面并导航到配置文件会话:

http://www.apachefriends.org/en/xampp-windows.html

I would recommend you to use WAMP Server. As you are new to PHP WAMP server have less configuration settings and easy to use as compare to XAMPP.

我建议您使用 WAMP 服务器。由于您是 PHP 的新手,因此与 XAMPP 相比,WAMP 服务器的配置设置较少且易于使用。

回答by developerCK

I don't know what is the situation but i would recommend these thing.

我不知道是什么情况,但我会推荐这些东西。

  • php.ini is under xampp>php folder
  • if you downloaded xampp.rar/.zip and unzip in a directory then please run xampp>setup.bat found in xampp folder it will be needed whenever you will relocate your xampp folder.
  • for sending mail you should ther are two options:- first by you own smtp server and by some other like gmail,yahoo, microsoft etc. In first case setup mail server as come with xampp and add smtp related entry in php.ini In second you will only need to add smtp related seeting to php.ini basic settings are:

    • smtp host :
    • smtp port :
    • smtp username:
    • smtp password:
  • php.ini 在 xampp>php 文件夹下
  • 如果您下载了 xampp.rar/.zip 并解压到一个目录中,那么请运行在 xampp 文件夹中找到的 xampp>setup.bat,每当您重新定位您的 xampp 文件夹时都需要它。
  • 对于发送邮件,您应该有两个选择:-首先由您自己的 smtp 服务器和其他一些如 gmail、yahoo、microsoft 等。在第一种情况下,设置邮件服务器作为 xampp 并在 php.ini 中添加与 smtp 相关的条目。您只需要在 php.ini 基本设置中添加 smtp 相关设置:

    • SMTP主机:
    • smtp 端口:
    • smtp 用户名:
    • 短信密码:

so whenever you will send email , email will be sent from this email id.

因此,无论何时您发送电子邮件,都会从该电子邮件 ID 发送电子邮件。

回答by vijayabalan

open the xampp control panel .then click apache module config button .you will get some list.after that click the php.ini file.it will open into editor automatically.

打开 xampp 控制面板。然后单击 apache 模块配置按钮。你会得到一些列表。然后单击 php.ini 文件。它会自动打开到编辑器中。

enter image description here

在此处输入图片说明