php 如何在记事本++中编写php代码?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14314096/
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 07:04:05  来源:igfitidea点击:

How can I write php code in notepad++?

phpnotepad++

提问by Rehan Aryan

I'm very new to this editor, and I want to know the basics of writing PHP code in notepad++ e.g which file should I create, and from which option?

我对这个编辑器很陌生,我想知道在记事本++中编写 PHP 代码的基础知识,例如我应该创建哪个文件,以及从哪个选项中创建?

回答by Lucas

Firstly, open Notepad++. Then open a new document if a new one is not on the screen already. Then go to the languages menu option, go down to P, and select PHP. Then type in your PHP code. When you want to save it, press the save button near the top right hand corner, and choose a name.

首先,打开记事本++。如果屏幕上没有新文档,则打开一个新文档。然后转到语言菜单选项,转到 P,然后选择 PHP。然后输入您的 PHP 代码。如果要保存,请按右上角附近的保存按钮,然后选择一个名称。

That's all. Pretty simple, eh?

就这样。很简单吧?

Just note, other languages can be selected from the languages bar. If you select no languages, it would be default text, but that can be changed too, and after you save the file with a .phpextension, Notepad++ will automatically recognise the document as PHP, and render it accordingly.

请注意,可以从语言栏中选择其他语言。如果您不选择任何语言,它将是默认文本,但也可以更改,并且在您使用.php扩展名保存文件后,Notepad++ 会自动将文档识别为 PHP,并相应地呈现它。

P.S. If all that seems a smidgen complicated, you might want to read bretterer's comment. It's exactly what you should do.

PS 如果这一切看起来有点复杂,您可能需要阅读 bretterer 的评论。这正是你应该做的。