Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

salmankhan2482's avatar

how can i crate .env file in php thorugh coding without using any package

how can i create .env file in core php and then write the data to the env variables coming in request from the form.

0 likes
14 replies
salmankhan2482's avatar

@imrodrigoalves but is there anyway that i can do it without the package. the framework i am working in is a bit different than the laravel.

salmankhan2482's avatar

@imrodrigoalves can i do it doing the manual coding and not using the package because i m not using laravel so it wont be possible to use any package.

Snapey's avatar

here on this forum, you can ask questions about the laravel framework. When a problem is described, just a few words can be used to describe the setup and what you are trying to do.

However, wth you, you are saying you are NOT using a framework, but are writing everything from scratch. So, we know you are using php but then..... nothing. You could literally write anything you like and we would be totally unable to guess the problem without you showing EVERY line of code.

I suggest you need to learn a lot more. Then you will learn that you will build better, faster, more reliable and more relatable code by using a framework.

Please or to participate in this conversation.