View Full Version : What is php

12-14-2003, 01:28 AM
Yea what is php:

hey wait I know:

* PHP stands for Hypertext Preprocessor
* PHP is a server-side scripting language, like ASP
* PHP scripts are executed on the server
* PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
* PHP is an open source software (OSS)
* PHP is free to download and use

thats psp....

ok now this doesn't tell me anything

so can someone tell me what php and asp is?

and give me some examples for what it is used

and which one i should start learning (php or asp)

thanks for any reply

12-14-2003, 01:33 AM
PHP and ASP are server scripting languages

PHP and ASP can do lots of things, more than we can post in this thread.

Start learning PHP, PHP is so much better than ASP. It is also easier, at least for me.

12-14-2003, 03:20 AM
Can you give me some examples that php can do but html or js cant?


12-14-2003, 03:24 AM
Juuuuust one more problem.... How do i get started with php without a server?

and what do i need to use php....

is notepad enough?

12-14-2003, 04:57 AM
Originally posted by JAVAEOC
Can you give me some examples that php can do but html or js cant?


ignoring server-side javascript (as most do;))

read/write to databases,
read/write from the filesystem
execute native system calls
create , manipulate images
interface with JAVA or COM objects
create & parse XML
dynamically create HTML , javascript

... err there are loads more but mostly based around the above

basically you could not build ebay or yahoo without a server-side language of some description, php is just one of them , though a good one IMO

forget ASP , if you want to live on that side of the fence then look at .NET , its a whole diffferent ballgame to ASP.OLD with 10x the functionality.

Originally posted by JAVAEOC

and what do i need to use php....

to get started with PHP you just need a webserver & PHP & notepad (though I would recommend a decent free text editor)

take a look at the sticky thread for phpdev , or there are many more such packages ( easyPHP , phpTriad , IBserver , foxserve ) , it does not matter which you get they all do the same job , or grab apache and php and install yourself.

12-14-2003, 10:53 AM
another differnce is security. in JS (and VBS and whatever else) are client side, which means that your code is sent to the client machine (ie the visitor) and is read and executed by their machine.

now this is good and dandy if you want to create rollovers and visual effects (something PHP can't do btw) on your page, but if its for password protecting a page then that would mean in JS having to leave the password verification process in its code IE leaving the password on the visitors machine IE security like swiss cheese.

now with PHP the sebserver will realise someone is trying to acces a .php file and read it and parse its code before handing it back to the visitor. that means all the server side code is hidden from the visitor and you can protect stuff more efficently

12-14-2003, 03:00 PM
you said i just need a webserver & PHP & notepad ....

is there anyway i can start using php without a webserver?

cause i dont wanna spent money on a server just to lear php :p

12-14-2003, 03:14 PM
oh i tried to download that php423 or what ever it says in the sticky.... it wont let me or it gets me to another page....

so can some one please give me a direct link to the download file....
so even stupid people (linke me) can find it


12-14-2003, 03:19 PM
You don't have to spend money on a server. There are plenty of free ones out there. My favorite is IBServer which you can download here --> http://ibsoftware.d2digitalmedia.com/ibserver/

Install that, and you're ready to start learning PHP.

12-14-2003, 03:25 PM
ok I just downloaded that phpdev423 thingy.... what do i do next?

12-14-2003, 07:39 PM
It would be easier if you downloaded a server, like IBServer linked above, with PHP already installed on it.

12-14-2003, 08:44 PM
not really, PHPdev comes with everything configred, but seting it up manually is a knowledge enriching experience

12-14-2003, 11:47 PM
if you got phpdev (which includes the free apache webserver)

make a file called test.php with the contents

echo 'my first PHP script ran on ' . date('l dS of F Y @ h:i:s A' , mktime() ) ;

save it to c:/phpdev/www/test.php (or whichever is the right path to /phpdev/www/)

goto http://localhost/test.php

the same for any of the other packages just the path to your document root is different (the directory that you serve web-pages from)

to answer your other question though , yes PHP can be run without a webserver , write a script then at a dos prompt type

c:/phpdev/php/php.exe -q -f c:/path/to/script.php

and hit enter to run the script , you can do file associations for point and click if you wish as well though not much point unless you do a lot of shell scripting.

php also can create x-platform GUI's in the shape of http://gtk.php.net but get the hang of the usual stuff first ;)