php

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
Lilith
Forum Newbie
Posts: 2
Joined: Sat Oct 06, 2007 11:37 pm

php

Post by Lilith »

When I first downloaded php I thought it would be like programming in MASM or C++. I do not think this is true anymore as I downloaded php and installed it. It did not bring up it's own program it just said it was installed. Does it just make your computer familiar with php or did something go wrong and I am supposed to have a complier or something? :?:
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

PHP isn't a compiled language like C++. All scripts are run through the interpreter (a single binary file) to produce the script's output. PHP is usually hooked up to a web server via CGI, and isn't used to create binary, standalone programs like you would in C++ or MASM
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Post by VladSun »

You can run a PHP script in console by executing:

Code: Select all

php -f file.php
You will see its output (STDOUT tarrgeted) in the console.
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Choose the Right Board

Post by s.dot »

VladSun wrote:You can run a PHP script in console by executing:

Code: Select all

php -f file.php
You will see its output (STDOUT tarrgeted) in the console.
Along with many other command line features.
http://us.php.net/manual/en/features.commandline.php

If you're using windows, you'll have to add php to your PATH environment variable.

Moved to Installation and Configuration.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:1. Select the correct board for your query. Take some time to read the guidelines in the sticky topic.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Lilith
Forum Newbie
Posts: 2
Joined: Sat Oct 06, 2007 11:37 pm

Post by Lilith »

Ok I think I get it. MySQL is like a library for php, right? You need a server to test your script. Does php only work on a server or can you run it like the html code. I know with html you can write it in notepad and save it as an internet file and you can access it. Is php like that?
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

If you have it on your localhost, it can be.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply