You need to install phpdebug, I use the xdebug extension
I have been using sublime before, but I recently switched to it, so I wanted to install the debug that I wanted to install before. I tried it several times on the company server, but it was inexplicably not done properly. I had a holiday today and installed it on my computer. xammp, and then it is configured. . . Then try to configure it on the remote server (actually it is the Linux virtual machine on your own computer)
1. Confirm that php has the php extension installed (if it is not installed, you can install it on Baidu). There are many configuration items for the configuration after installation. I will only write a few, as long as they can run
<code>vi /etc/php<span>.d</span>/<span>15</span>-xdebug<span>.ini</span> zend_extension=xdebug<span>.so</span> xdebug<span>.remote</span>_enable = <span>1</span><span>#默认开启</span> xdebug<span>.remote</span>_handler = <span>"dbgp"</span>xdebug<span>.remote</span>_host = <span>"192.168.152.1"</span><span>#本地机器的ip</span> xdebug<span>.remote</span>_mode = <span>"req"</span><span>;xdebug.remote_connect_back = 1 #不确定自己ip的话,可以把这项注释去掉</span> xdebug<span>.remote</span>_port = <span>9002</span><span>#这个是phpstom设定的监听的端口</span> xdebug<span>.collect</span>_vars = On</code>
2. Download the project To go locally, I directly use file->settings->Build, Execution, Deployment->Deployment to set up
3. There are two places to set the ide listening port
It is set like this in the picture below. Note that the port number must be consistent with the xdebug.remote_port set by the server
4. Fill in the server name and the mapping between the server and local files below
5.Set debug configuration
Add a PHP Web Application and select the server set in the fourth step
5. Turn on monitoring
6. Select the debug configuration you just added and click on the bug to run it~~~
If it fails, if it fails, turn off selinux on the server and it should be ok
Copyright statement: This article is an original article by the blogger and may not be reproduced without the permission of the blogger.
The above introduces phpstom to configure remote debugging of PHP, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

php把负数转为正整数的方法:1、使用abs()函数将负数转为正数,使用intval()函数对正数取整,转为正整数,语法“intval(abs($number))”;2、利用“~”位运算符将负数取反加一,语法“~$number + 1”。

php除以100保留两位小数的方法:1、利用“/”运算符进行除法运算,语法“数值 / 100”;2、使用“number_format(除法结果, 2)”或“sprintf("%.2f",除法结果)”语句进行四舍五入的处理值,并保留两位小数。

判断方法:1、使用“strtotime("年-月-日")”语句将给定的年月日转换为时间戳格式;2、用“date("z",时间戳)+1”语句计算指定时间戳是一年的第几天。date()返回的天数是从0开始计算的,因此真实天数需要在此基础上加1。

php判断有没有小数点的方法:1、使用“strpos(数字字符串,'.')”语法,如果返回小数点在字符串中第一次出现的位置,则有小数点;2、使用“strrpos(数字字符串,'.')”语句,如果返回小数点在字符串中最后一次出现的位置,则有。

是的,像XDebug这样的调试器会降低PHP服务器的性能。这就是调试器不放置在服务器环境中的原因。它们部署在不同的环境中,以避免不必要的开销。调试消息无法在已处于生产阶段的应用程序中显示。当将调试行为添加到服务器上,调试引擎附加到PHP进程。它开始接收消息以在断点处停止,但这不是必需的行为,因为它会给其他进程带来高性能打击,从而停止PHP解析器。另一方面,当调试器安装后,它们往往会在服务器中打开端口,因为它们不打算在生产环境中使用。在服务器中打开端口就像为黑客打开一扇窥探之门一样糟糕。

在PHP中,可以利用implode()函数的第一个参数来设置没有分隔符,该函数的第一个参数用于规定数组元素之间放置的内容,默认是空字符串,也可将第一个参数设置为空,语法为“implode(数组)”或者“implode("",数组)”。

查找方法:1、用strpos(),语法“strpos("字符串值","查找子串")+1”;2、用stripos(),语法“strpos("字符串值","查找子串")+1”。因为字符串是从0开始计数的,因此两个函数获取的位置需要进行加1处理。

转化方法:1、使用“mb_substr($url,stripos($url,"?")+1)”获取url的参数部分;2、使用“parse_str("参数部分",$arr)”将参数解析到变量中,并传入指定数组中,变量名转为键名,变量值转为键值。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Atom editor mac version download
The most popular open source editor
