您现在的位置是:首页 > PHP框架交流PHP框架交流
phpstorm 新建php文件显示为文本 不提示php语法
上善若水2022-02-14 22:35:38【PHP框架交流】 2047人已围观
简介phpstorm 新建php文件显示为文本 不提示php语法 跟显示txt文本文件一样 不提示任何语法 不变任何颜色 把文件删除 重新建还是一样 默认一文本方式打开 终于找到方法解决.1.首先在设置中
phpstorm 新建php文件显示为文本 不提示php语法 跟显示txt文本文件一样 不提示任何语法 不变任何颜色 把文件删除 重新建还是一样 默认一文本方式打开 终于找到方法解决.
1.首先在设置中排除
Settings → Editor → File Types→ Text
For OS X
Preferences → Editor → File Types→ Text
发现在Text列表中 没有要找到的文件. 将显示类型出错的PHP名字添加进列表 提示 phpstorm file type auto-detected by file content
点击左边重置 然后将刚才添加到php文件删掉解决问题.
2.方式二 若提示上面的提示可以按照官方文档提示操作
网上一般是按照方式一解决问题 但是方式二实际上更快!
ssociate a filename pattern with specific file type
If PhpStorm cannot identify the type of the file that you are trying to open or create, it displays the Register New File Type Association dialog where you can choose the way you want to process this file.
If the dialog doesn’t appear automatically, right-click the file in the Project tool window and select Associate with File Type from the context menu or choose File | File Properties | Associate with File Type from the main menu.
In the Register New File Type Association dialog, select the necessary options:
PhpStorm: Associating a filename pattern with specific file type
From the File pattern list, select whether you want to specify a type for the current file (file.extension) or for all files with this extension (*.extension).
Select one of the following options:
Open matching files as text and auto-detect file type by content: open the file without an extension as a text file and identify its type by the content, for example, by the shebang line.
Open matching files in PhpStorm: associate the file with one of the existing file types. You can change this association later in the settings.
Open matching files in associated application: open the file in the default system application configured in your operating system. For example, .pdf files are opened in the default PDF viewer.
If necessary, you can check and configure all filename patterns associated with system applications.
Click OK to apply the settings.
很赞哦! (1)
上一篇: 理解yii自动加载机制 yi框架自动加载
下一篇: php yar扩展实现rpc调用
相关文章
随机图文
-
php技术提升心得与方法
现在的PHP市场虽然充斥了大量的的PHP开发人员,但这些人当中真正能称得上高手的却寥寥无几。很多公司虽然招聘了一些PHP开发人员,但是由于技术水平不高,导致公司的项目一直堆积。这不仅另公司无奈也让已经入职的PHP开发人员着急,他们也想要在PHP领域更近一步,但却苦于找不到提高自己的方法,下面我们的鸥仔收集了一些PHP大神的一些工作方式、习惯,让大家看看PHP大神们是如何工作,也希望这些方法能帮助到那些想要在PHP领域更近一步的人。 -
历年出生人口(1949-2021)
先看一组人口出生数据:2019年:1465万2020:1200万2021年:1062万 1949年:1275万 1950年:1419万 1951年:1349万 1952年:1622万 1953年:1637万 1954年:2232万 -
springboot mybatis thymeleaf layui 个人博客源码分享
使用springbootmybatisthymeleaflayui将博客网站进行了重写,精简了些许内容,利用业余时间终于完成了博客的第一版,基本功能已经实现.或许还有很多需要完善的知识点.以后 -
php技术提升心得与方法
现在的PHP市场虽然充斥了大量的的PHP开发人员,但这些人当中真正能称得上高手的却寥寥无几。很多公司虽然招聘了一些PHP开发人员,但是由于技术水平不高,导致公司的项目一直堆积。这不仅另公司无奈也让已经入职的PHP开发人员着急,他们也想要在PHP领域更近一步,但却苦于找不到提高自己的方法,下面我们的鸥仔收集了一些PHP大神的一些工作方式、习惯,让大家看看PHP大神们是如何工作,也希望这些方法能帮助到那些想要在PHP领域更近一步的人。