dansk Posted December 21, 2006 Share Posted December 21, 2006 Hey everyone, after some googling, I landed on this website, I am hoping that you guys will not let me down.I am fairly new to php, i installed phptriad, started apached, created a test file called test.php, put it in my c:\apache\htdocs\then tried to run it in //localhost/test.php, and nothing comes upfor example, i put this in the file<?php$name = "sun";$age = "14";echo "Hi i am $name and i am $age years old";?>and this is what i get<?php$name = "sun";$age = "14";echo "Hi i am $name and i am $age years old";?>The only thing that i did is that i installed some FF updates, that's allthanks Quote Link to comment Share on other sites More sharing options...
hawkeye0203 Posted December 21, 2006 Share Posted December 21, 2006 apache isn't recognizing .php as a valid page and doesn't know what to do with it.stop and restart apacheif that doesn't work, in your Apache config file, scroll to the very bottom and there should be a line in there that was placed by the php installation. If that isn't there, reinstall php. Quote Link to comment Share on other sites More sharing options...
dansk Posted December 21, 2006 Author Share Posted December 21, 2006 Thank you,it's working nowI installed PHP coder, i wrote some code to get some info from mysql DB called Library, and table is called Books<?php// making the connnection$query = "SELECT * Books";$result = mysql_query($query) or die(mysql_error());$row = mysql_fetch_array($result) or die(mysql_error());echo $row['Book Name']. " - ". $row['Date'];?>I just wanna print the name of the book and the date (just for testing purposes).But for some reason, I am unable to connect my php coder to my local server, what is my webserver doc diectory and what's my web server root url? Quote Link to comment Share on other sites More sharing options...
hackerkts Posted December 25, 2006 Share Posted December 25, 2006 http://localhost/ or http://127.0.0.1/ Quote Link to comment Share on other sites More sharing options...
dansk Posted December 26, 2006 Author Share Posted December 26, 2006 Thank you very mucho :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.