| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read | ![]() |
|
||||||
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hello everybody,
may be this is new but let me say that everyone on this forum has a web site or want to own own one and most of them are using pre-programmed scripts and sites like JOOMLA,MAMBO,PHPNUKE,POSTENUKE,WORDPRESS,PHPBB,VB, SMF...etc But have you ever think about creating your own site? and make your own thoughts go alive!? So , let's start here: What we do need is a local server to be able to interpret PHP and manage MySQL and set up an HTTP server that's Apache. Ok, just download the latest wamp server that has all that tools on : wampserver.com then install and let we start. when you see the wamp's icon change from red to yellow then white , it does mean that both Apache2 and MySQL are running and to create our local sites we need to put our scripts into its WWW directory which should be in : 'c:\wamp\www\' , if you choosed C if not look where you installed it. Now create a directory inside the above 'c:\wamp\www\' like 'test' and then create a simple text file called 'index.php' , so that we can access through any web browser like mozilla,IE,opera... from this address: localhost/test/ ________________________________________ Let's start now on the real phase , open the file called index.php with an editor , I recommend phpdesigner.dk/phpdesigner2007_setup.exe and add what tells the interpreter 'THIS IS A PHP SCRIPT' , Code:
As we all know this kind of scriptured languages are run on the server side and then the server sends us the result which always appear like an HTML page, so to print a sinple text we can use some instructions like 'echo' , or 'print' and then we see the result sent by executing this echo or print. try this : Code:
after run that simple script you may see that both Hellos are Written like that 'Hello , world!Hello , world!' and you want it to be more meanningful , all what you have to do is to add the simple HTML trick the , so it would be like this : Code:
'; print 'Hello . world!'; ?> This was the starting and if any body likes this post and wanna continue just tell me here Next lessons will more more useful for beginners then we swap to advanced ![]() |
![]() |
| Thread Tools | |
| Display Modes | |
|
|