Jump to content

i need help getting PHP


abyssXX

Recommended Posts

By default it will only execute .php files using PHP. If you want to execute PHP in other file types, you will need to configure Apache to do that. Unless you have control over a web server where you will change that setting online, then its better to leave it like it is.

Link to comment
Share on other sites

By default it will only execute .php files using PHP. If you want to execute PHP in other file types, you will need to configure Apache to do that. Unless you have control over a web server where you will change that setting online, then its better to leave it like it is.
i made the hello world program and saved it as php test.php but some reason it opens in microsoft picture editor or somthin and then says cannot open
<html><body><?phpecho "Hello World";?></body></html>

Link to comment
Share on other sites

Ohhh... read this tutorial or any similar one for instructions on how to install Apache, PHP and MySQL or download a package that will install it all for your. I reccomend XAMPP. See apachefriends.org for instructions to install XAMPP (even though it's almost too easy).If you've installed Apache or any other server on a PC, typing "localhost" into the browser will lead to the root of that server. If that doesn't work now, it simply means you haven't installed it or started it properly. And you need to have a web server running in order to use PHP.

Link to comment
Share on other sites

Guest subhumane

I read this post and downloaded the WAMP5 program. So, what do I do with it? It doesn't seem to do anything. Do I just write my php files in notepad like regular html? Why did I need to download the WAMP5 in the first place?Then I saved the tutorial code for hello world and opened it with my broswer, and it prompts me to open or save the file. Why is the php file downloading when I open it with the broswer?Thanks.Brett

Link to comment
Share on other sites

Do I just write my php files in notepad like regular html?
Good god man, no! You must use ConTEXT instead (see my signature). Notepad is for people who don't have anything better to do then manually format and parse their own code. Bah!WAMP is just a collection of tools that will allow you to run PHP. The main components are Apache (a web server) and the PHP engine itself. When a web server like Apache gets a request for a PHP page, for example index.php, it sends the index.php file to the PHP engine, which executes it and sends back the output (HTML) to the web server. Then, the web server takes that output and sends it to the browser that asked for the file in the first place.If you are getting a download box, then Apache wants to send you the php file directly instead of having the PHP engine execute it. There is a setting in one of Apache's config files to say where to send PHP files. But I thought the WAMP installer should have done that for you.
Link to comment
Share on other sites

I would like to install php locally on my computer as well, and I'm wondering do I need the apache server, or what do I need to run PHP, how, and where to get it. Sorry to but into someone elses thread but this may answer his questions as well.I see PHP on my browser, but not if I save a php file.

Link to comment
Share on other sites

If you install WAMP it will install everything you need to use PHP.
Okay, so I downloaded WAMP and conText(Which is soooo good by the way) so now I have everything I need to start running PHP scripts on my computer?I just picked all of the default settings in installation except my email, is there anything I need to change, or might need to change?I didn't touch any of the settings on the actually program itself either.
Link to comment
Share on other sites

I just did a test and my PHP file displays in IE without having to 'download' the file, but the contents are blank.test.php

<html><head></head><body><?phpecho "hello world";?></body></html>

As I said, I haven't changed anything, so what's wrong?

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...