Jump to content

how to Start using PHP?


DarnJhud
 Share

Recommended Posts

hi everyone, i am in my 3rd year college and i want to learn the PHP programming language. i have a background on other programming languages like HTML, JavaScript, JAVA and Visual Basic which i study both in school and via online. and when i come to research on PHP i have learned that it is need to be configured on my web server?and so i search for more article and i found this site on how to check if my web server supports PHP. 1st it make me do a simple info.php (containing this code: <?php phpinfo(); ?> ) -- the result is blank. just a white page, no error. nothing.. 2nd is making another .php file containing this code:

<?php// Start Sessionsession_start();// Show bannerecho '<b>Session Support Checker</b><hr />';// Check if the page has been reloadedif(!isset($_GET['reload']) OR $_GET['reload'] != 'true') {   // Set the message   $_SESSION['MESSAGE'] = 'Session support enabled!<br />';   // Give user link to check   echo '<a href="?reload=true">Click HERE</a> to check for PHP Session Support.<br />';} else {   // Check if the message has been carried on in the reload   if(isset($_SESSION['MESSAGE'])) {	  echo $_SESSION['MESSAGE'];   } else {	  echo 'Sorry, it appears session support is not enabled, or you PHP version is to old. <a href="?reload=false">Click HERE</a> to go back.<br />';   }}?>

and the result is this asdasd.png (i used FTP client (FileZilla Server) to upload those file. and i open them using my browser.) does this mean that my web server dont support PHP? if not what should i do to make my web server support PHP?

  • Like 1
Link to comment
Share on other sites

for beginners just install WAMP sever for running PHP. its better!!!!!!!!!1
Edited by sumbin
  • Like 1
Link to comment
Share on other sites

for beginners just install WAMP sever for running PHP. its better!!!!!!!!!1
hi everyone, i am in my 3rd year college and i want to learn the PHP programming language. i have a background on other programming languages like HTML, JavaScript, JAVA and Visual Basic which i study both in school and via online. and when i come to research on PHP i have learned that it is need to be configured on my web server?and so i search for more article and i found this site on how to check if my web server supports PHP. 1st it make me do a simple info.php (containing this code: <?php phpinfo(); ?> ) -- the result is blank. just a white page, no error. nothing.. 2nd is making another .php file containing this code:
<?php// Start Sessionsession_start();// Show bannerecho '<b>Session Support Checker</b><hr />';// Check if the page has been reloadedif(!isset($_GET['reload']) OR $_GET['reload'] != 'true') {   // Set the message   $_SESSION['MESSAGE'] = 'Session support enabled!<br />';   // Give user link to check   echo '<a href="?reload=true">Click HERE</a> to check for PHP Session Support.<br />';} else {   // Check if the message has been carried on in the reload   if(isset($_SESSION['MESSAGE'])) {	  echo $_SESSION['MESSAGE'];   } else {	  echo 'Sorry, it appears session support is not enabled, or you PHP version is to old. <a href="?reload=false">Click HERE</a> to go back.<br />';   }}?>

and the result is this asdasd.png (i used FTP client (FileZilla Server) to upload those file. and i open them using my browser.) does this mean that my web server dont support PHP? if not what should i do to make my web server support PHP?

for beginners WAMP server is the best!!!!!!!!!! try ithttp://www.wampserver.com/en/
  • Like 1
Link to comment
Share on other sites

thank you very much. :good:

Edited by DarnJhud
  • Like 1
Link to comment
Share on other sites

sir i have one question. when using WAMP server, every time i create PHP file it should be located on www folder created by WAMP upon install? because when i try to copy my PHP file into my FTP server folder i cant view them.

Edited by DarnJhud
Link to comment
Share on other sites

i think when u are coding in ur local machine it doesnt need any FTP server. so dnt bother about FTP server now. do ur work in local machine then u can upload to any site using any FTP.

Link to comment
Share on other sites

<?php echo "Hello World";?>

The code above would be the best piece to start off. There is so much possibility with just 'Echo' to use. I suggest you move on next to learning variable handling, after that, learn 'If' statements. After that you should have the basic grasp of the language where you could pretty much 'talk' and 'reason' by speaking PHP. It's a language, remember, only that it's more technical, optimized, and you have a few selections of words to choose.

Edited by getty
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...