Ugly Hedgehog - Photography Forum
Home Active Topics Newest Pictures Search Login Register
General Chit-Chat (non-photography talk)
How do I open .PHP files?
Jul 30, 2018 17:15:53   #
Dan Mc Loc: NM
 
Tried everything I can think of save buying a program!

Reply
Jul 30, 2018 17:20:11   #
Kozan Loc: Trenton Tennessee
 
PHP files are just text files. You don't open it unless you are a programmer. You have to have PHP running on your computer to run the file.

Reply
Jul 30, 2018 17:49:14   #
LarsCarlin
 
You edit .php files with a text editor (even notepad) but it's a programming language. I use an Adobe program called dreamweaver. Wordpress will allow you to edit the files locally, too.
The server (or where you host your website) must run a php web server.
These files are interpreted at RUN time and the results get displayed on your web page.
Servers will prevent you from accessing the .php files unless you have permission. You might see the files name, but you can't read it.
It's a bigger question that just How to Open the file. But go have a look!

Reply
 
 
Jul 30, 2018 18:11:17   #
Dan Mc Loc: NM
 
Yeah, I am a novice at all of this, so.....guessing game for sure.

Reply
Jul 30, 2018 19:44:37   #
DirtFarmer Loc: Escaped from the NYC area, back to MA
 
A php file is a program that outputs html code. The html code that the php program produces is used for a web page. It takes parameters that the user can supply at run time so you can get different pages for different inputs.

I have used it to produce web-based sites that allow me to enter information and use it for various purposes. For example I wrote a program that takes all my irrigation zones and presents buttons to tell the program that I have turned the irrigation on or off. Each zone has an irrigation duration and frequency. When a zone is due for having the irrigation turned on the program presents a list of zones, the ones that are due to be turned on are presented in the order they should be turned on and they are presented in a red font to attract attention and "due on" is shown next to the zone name. Similarly, when a zone has been on long enough the zone is presented in red and "due off" is presented next to the zone name.

It's easier than trying to carry around a piece of paper (which gets lost in the field). Anyone with the URL can use it so any of the field hands can address irrigation issues. The program keeps track of which zones are turned on and off and records the date and time. At the end of the year I have a complete list of which crops got how much water and when.

If it rains there's a button to delay the irrigation schedule. If the crop is harvested there's a button to delete that irrigation zone. If a new crop is planted there's a button to bring up another program to enter the parameters needed for that crop. There's a button that brings up another program that allows me to edit the parameters for a crop if necessary.

Since it's a web-based program, it will work on android, iphone, or unix; basically any OS that will support a browser.

The server that you use for your website has to be able to run a php program. Most commercial services have such a capability. If you run your own server you have to add that capacity.

And yes, you can write the program in a text editor. I used Dreamweaver, which I use to write html code. Php code can be embedded in html.

Reply
Jul 30, 2018 20:02:52   #
Dan Mc Loc: NM
 
OK, but I don't have or operate website. A file was sent to me as .PHP and I, the casual, novice Windows 7 email user, can't open it at all.

Reply
Jul 30, 2018 20:45:31   #
Longshadow Loc: Audubon, PA, United States
 
Dan Mc wrote:
OK, but I don't have or operate website. A file was sent to me as .PHP and I, the casual, novice Windows 7 email user, can't open it at all.


Who sent it? What is its purpose? Unless you trust the person, I wouldn't open/run it.
It IS a program... and you do need a PHP processor, like on a server, to run it.
I use some PHP in my website, as most people probably do.

Curious - how many pages it is? You can look at it with Notepad.
Oh, and you can't see what it does unless the instructions are to put something on the screen...
You have to know PHP coding.

Reply
 
 
Jul 30, 2018 21:09:32   #
Dan Mc Loc: NM
 
Thanks for all the replies, but I am disregarding any implication I may have with it. I'll send him a note and explain that if he wants me to view it, he'll have to find another way.

Reply
Jul 31, 2018 13:38:43   #
bwana Loc: Bergen, Alberta, Canada
 
Dan Mc wrote:
Tried everything I can think of save buying a program!

If you received this file from someone you don't know, don't open it! PHP files are the perfect way to infect computers with viruses or other crapware!

They are computer code and simply in text format. Notepad will open them.

bwa

Reply
If you want to reply, then register here. Registration is free and your account is created instantly, so you can post right away.
General Chit-Chat (non-photography talk)
UglyHedgehog.com - Forum
Copyright 2011-2024 Ugly Hedgehog, Inc.