Debt Consolidation - Self Improvement Articles Directory - Stardoll Money Cheats - Debt Consolidation - French Property

PDA

View Full Version : PHP Noob in need! lol


Pixel T.
Sep 4th 2007, 5:06 pm
Hey,

I'd like to learn PHP but for some reason, when I edit the code, and then save it as .PHP, when I click the icon for it, it comes out in a web browser and I download it. How would I preview my own code?

Sorry for typing fast, hope you understand.

YoEli
Sep 4th 2007, 5:11 pm
PHP is a preprocessed server side language, you can't just open it up like HTML.

For it to function you need to have your PHP scripts on a web server with PHP enabled. I myself develop on a packaged setup mostly.

One setup--the one I use--that will have all the servers/settings you need to get started is VertrigoServ (vertrigo.sourceforge.net), it's free so go download it and have a good time.

Once you start the server, you can use the icon in the task manager to goto the website, or the folder where you docs are stored.

Hope this helps.

Eli

NickD
Sep 4th 2007, 7:03 pm
Another great program that installs PHP, MySQL, Apache on your windows box is EasyPHP (http://sourceforge.net/projects/quickeasyphp/) :)

nabil_kadimi
Sep 4th 2007, 7:22 pm
Yet another great package is WAMP (Win, Apache, MySQL, PHP)
- When you install it, you choose where to put the www/ folder;
- So if you save your file like this c:/.../www/myFirstSite/test.php
the url to test it will be http://localhost/myFirstSite/test.php

Arson
Sep 4th 2007, 9:37 pm
Use WAMPserver.

You can find a download for it on their site.

http://www.wampserver.com/en/

webrickco
Sep 5th 2007, 2:20 am
As to me, i'm very satisfied with UniformServer

MMJ
Sep 5th 2007, 2:00 pm
AppServ for me. Lol.

Pixel T.
Sep 6th 2007, 4:01 pm
Another great program that installs PHP, MySQL, Apache on your windows box is EasyPHP (http://sourceforge.net/projects/quickeasyphp/) :)

I have downloaded it and installed it. Im just wondering what is it suppose to do? Sorry, noob here

liam1412
Sep 6th 2007, 7:38 pm
Okay here is a quick run down


Click on the easyphp icon to start the servers. It should come up with a little box with traffic lights on when the server are started they will turn green. You can then minimize this and it will go to your system tray.


Now if you go into the folder for easyphp in your programme files. Find a folder called www. This is your document root. The document root is where all files you want to be processed by php should be stored. Create a shortcut this folder on your desktop as you need access to it all the time.

Now as a start just to check all your servers are working


Open a word document

Input this

<?php

echo "If this is written in the browser then we have lift off.";

?>

Save this file as test.php to that folder called www.


Now open your web browser and type the following into the address bar

http://localhost/test.php

When you hit enter the above message should appear.

Lemme know if you need any more help

Pixel T.
Sep 7th 2007, 12:20 pm
Okay here is a quick run down


Click on the easyphp icon to start the servers. It should come up with a little box with traffic lights on when the server are started they will turn green. You can then minimize this and it will go to your system tray.


Now if you go into the folder for easyphp in your programme files. Find a folder called www. This is your document root. The document root is where all files you want to be processed by php should be stored. Create a shortcut this folder on your desktop as you need access to it all the time.

Now as a start just to check all your servers are working


Open a word document

Input this

<?php

echo "If this is written in the browser then we have lift off.";

?>

Save this file as test.php to that folder called www.


Now open your web browser and type the following into the address bar

http://localhost/test.php

When you hit enter the above message should appear.

Lemme know if you need any more help


Thanks man, I got it working. Repped!

EDIT:


Notice: Uninitialized string offset: 0 in C:\Program Files\EasyPHP 2.0b1\www\PHProxy.class.php on line 1020

Notice: Uninitialized string offset: 0 in C:\Program Files\EasyPHP 2.0b1\www\PHProxy.class.php on line 1023

Notice: Uninitialized string offset: 0 in C:\Program Files\EasyPHP 2.0b1\www\PHProxy.class.php on line 1026

Notice: Uninitialized string offset: 0 in C:\Program Files\EasyPHP 2.0b1\www\PHProxy.class.php on line 1029

Warning: PHProxy::include_once(url_form.inc) [function.PHProxy-include-once]: failed to open stream: No such file or directory in C:\Program Files\EasyPHP 2.0b1\www\PHProxy.class.php on line 435

Warning: PHProxy::include_once() [function.include]: Failed opening 'url_form.inc' for inclusion (include_path='.;C:/Program Files/EasyPHP 2.0b1\php5\pear\') in C:\Program Files\EasyPHP 2.0b1\www\PHProxy.class.php on line 435

Whats that all about? btw, its a PHP code and when I put it in, thats what comes up above the the webpage

liam1412
Sep 9th 2007, 4:52 am
I take it its a cut and paste of a code. I wouldn't really know withous seeing the code what the problem was.

Thanks