coolgamer48 Posted November 29, 2007 Share Posted November 29, 2007 Hey,I'm just beginning to learn PHP. I've written (well, copied would be more accurate) the simple echo "Hello World" script that the tutorial gives you, and I uploaded it to a web sever that says it supports PHP (Free Hostia, if anyone knows of it). When I click on the link though, nothing happens. A blank window comes up. Does this mean the site actually doesn't support PHP, or am I doing something wrong?In short, could someone please give a web host that supports PHP, and give a quick explanation on what to do so that it should work? I know that I can just set it up on my own PC too. I downloaded and installed the lasted version of PHP, but I think I need some other program (like a sever program or something). Could someone explain that to me and also how to make it work?Please and thank you! Link to comment Share on other sites More sharing options...
killboy Posted November 29, 2007 Share Posted November 29, 2007 Well... PHP is hard to configure manually. You need Apache and MySQL (if u wanna work with Data Bases).There are several programs on the Internet that configures all that for you, like:Wamp, AppServ, Xamp...I personally use AppServ http://www.appservnetwork.com/Now, the typical "Hello World" script is as simple as this: <?phpecho "Hello World";?> There you go!! Link to comment Share on other sites More sharing options...
zppblood Posted November 29, 2007 Share Posted November 29, 2007 Right click on the page, select "View Source" or "Source", and see that it isn't displaying the PHP code in there. http://awardspace.com/ is free (or pay for more features, space, bandwidth, etc.) that allows you to use PHP and MySQL database. Make sure you create the subdomain you want to use for your site, and disable or password protect your FTP account you can use from them because if you replace http with ftp in the address bar, they would be able to download the files and see your code, which they shouldn't see when going to your site as PHP code is ran on the server. Link to comment Share on other sites More sharing options...
Synook Posted November 29, 2007 Share Posted November 29, 2007 I'm just beginning to learn PHP. I've written (well, copied would be more accurate) the simple echo "Hello World" script that the tutorial gives you, and I uploaded it to a web sever that says it supports PHP (Free Hostia, if anyone knows of it). When I click on the link though, nothing happens. A blank window comes up. Does this mean the site actually doesn't support PHP, or am I doing something wrong?Did you give the file with the PHP in it the extension .php? Freehostia, as far as I am aware, supports almost all of PHP (except the mail() function for free users).I use WAMP (Google it) for my local server (on my PC). Link to comment Share on other sites More sharing options...
coolgamer48 Posted November 29, 2007 Author Share Posted November 29, 2007 Thanks for the repliesI file I uploaded was named test1.php. I know what the code to print Hello World is, but it just isn't working when I open the php file.I'll definetely check out http://awardspace.com/, and if that still doesn't work I'll try WAMP. Link to comment Share on other sites More sharing options...
mc_keny Posted November 29, 2007 Share Posted November 29, 2007 is it a wml or html page hmmm i bet you only using php on the page Link to comment Share on other sites More sharing options...
coolgamer48 Posted November 29, 2007 Author Share Posted November 29, 2007 is it a wml or html page hmmm i bet you only using php on the pageI'm not exactly sure what you mean. I uploaded the file test1.php Here are the file's contents:<html> <body> <?php $txt="Hello World"; echo $txt; ?> </body></html> I realize I could have just used echo "Hello World"; Link to comment Share on other sites More sharing options...
coolgamer48 Posted November 29, 2007 Author Share Posted November 29, 2007 Allright, thx for the site killboy, awardspace.com worked. I uploaded the same file and it worked fine. Thanks a bunch! Link to comment Share on other sites More sharing options...
killboy Posted November 30, 2007 Share Posted November 30, 2007 There's also another cool free web server that supports PHP:http://www.joolo.comBut, if what you want is to learn PHP, I'd suggest you to install it locally.Use Wamp or AppServ, both are good... Link to comment Share on other sites More sharing options...
guitar idiot Posted December 2, 2007 Share Posted December 2, 2007 Do Xampp, I use it and its really user friendly. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.