Ask Your Question

How do you edit .PHP files [closed]

asked 2020-11-22 20:33:54 +0200

kasloman gravatar image

I tried to edit a .php file in "Writer" and it ran the code. How do you edit these files?


edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant by floris v
close date 2020-11-24 12:14:51.571036



This is not a question related to LibreOffice and especially it is a bad idea at all to use a word processor editing source code.

Opaque gravatar imageOpaque ( 2020-11-22 22:28:37 +0200 )edit

3 Answers

Sort by » oldest newest most voted

answered 2020-11-24 10:53:00 +0200

kimy747 gravatar image

for that kind of file try to use a simple text editor (Notpade++ on windows and gedit , kate on linux) or an IDE (integrated development Environment ) such as PHPStorm etc.... which can help you to code and make changes easily

edit flag offensive delete link more

answered 2020-11-23 09:45:40 +0200

gabix gravatar image

updated 2020-11-23 12:14:00 +0200

If you really want to edit a PHP file in Writer (and yes, it is an utterly bad idea), change the file name extension to .txt and open/save it as unformatted text. When you open the file, always set the text language to none, this will (very slightly) reduce your chance of shooting your leg.

edit flag offensive delete link more

answered 2020-11-22 21:25:27 +0200

ve3oat gravatar image

It is recommended to use a plain "text editor", like Notepad or Notepad++. These won't run the PHP script and will save it as you have written it, without adding any word processor formatting.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2020-11-22 20:33:54 +0200

Seen: 84 times

Last updated: Nov 24 '20