Register for your free account! | Forgot your password?

Go Back   elitepvpers > Blogs > manulaiko3.0
You last visited: Today at 16:55

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Rate this Entry

Programming in PHP - General View

Posted 01/30/2015 at 15:58 by manulaiko3.0

Copy and paste from my website:



To program in PHP we will need a program called XAMPP, you can download it from .
XAMPP is a collection of programs that will let you put your localhost up to work, it includes Apache, MySQL, FileZilla Server, Tomcat and Ruby, but we are going to use Apache (more over we will use MySQL too).
Once you’ve downloaded and installed XAMPP (the installation is really simple) start the Admin Control Panel. You’ll see some buttons, click on the button “Run Apache” (or something like that) and your localhost will be ready to use!
Go to and you’ll see XAMPP in big letters, just ignore it. Now go to C:/xampp/htdocs (if you’re using linux go to /opt/lampp/htdocs) and delte everything (or create a new folder and move it there) why? Because we won’t need it.
Ok, now we have everything ready to start programming in PHP, let’s go!
Create a new file called “index.php”, it will be the index page of your localhost, this means that when you go to you’ll see the content of that page.
Open the file with a text editor (I recommend ) and write this:
<?php ?> Q: Hmmmm, what have you just did?
A: You’ve just created a new empty PHP file
All PHP scripts starts with “<!?php” and ends with “?>”, so you must be sure that your PHP code is inside those tags.
Save file and go to your localhost. WOW! It’s fucking nothing!!
It don’t prints anything because you didn’t put anything inside the tags.
Let’s make the common HelloWorld in PHP.
Put inside the tags this line:
echo "Hello World!"; Now the full code should look something like this:
<?php echo "Hello World!"; ?> If you save the file and refresh your localhost you’ll see this:
Hello World!
Congrats! You’ve just hacked your localhost!
Ok, now revise the code and pay atention to the “;” at the end of line 2.
All PHP sentences ends with a “;”, remove it and you’ll see what happens…
Fucking Error!!!
It’s a common issue forget the “;” at the end of the sentece so pay attention and it will be fixed, or don’t pay attention and once you’ve finished your script try to execute it and see if you missed one
What do we know now?
-Fucking nothing!
In next chapter I’ll talk about variables and comments, it’s really easy, you’ll see
See you!!
Posted in Uncategorized
Views 213 Comments 0 Email Blog Entry
« Prev     Main     Next »
Total Comments 0

Comments

 

All times are GMT +1. The time now is 16:56.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.