I use a hosting server. I would like to simply open some text files with PHP and write some of the data into my server’s database.
This is unrelated to any front-end/user activity.
I have never done this before and I am not sure where is the optimal location on the server…
I see directories at top level such as PHP is that it?
I should also add that I do not understand how to execute a PHP script in a non-HTML form context
please advise on that as well
sorry if this is stupid.
I usually have a
bindirectory in my project directory (next towebroot).I can’t see any reason to have a top level PHP directory in the first place.
Assuming it has a shebang line, you just run it:
or (and not needing the shebang):