Jump to content

Playing With Php...


Recommended Posts

Well, after spending 5 minutes of reading PHP, I've decided to try a bit of programming in it(MUDs are fun, and almost profitable if you have no life!)...

 

 

<?
$hello = "y hal0 thar world!<br> this will loop forever!";
$numbar = 1;

while($number != 0)
{
echo $hello;
}
?>

 

 

So, can somebody test it for me and see if it'll work :D?

Share this post


Link to post
Share on other sites

If you'd like some sort of ftp account on me little server so you can test it feel free to PM me :)

 

But from looking, looks like it'll work. You wouldn't get any output because, well, it'd loop forever and the page would just timeout. A better test might be a loop with a stop condition so the webpage will eventually be output to the browser :P

Share this post


Link to post
Share on other sites

don't you have an old box lying arond that you could set up apache and php or whatever on? that would work.

took me forever to realise the looping thing first time :lol:

460595[/snapback]

 

haha! infinite loops are the enemy :) I used to be great at making unintended infinite loops :D

 

EDIT: Oh and he could probably set up apache and PHP on Windows (with a few headaches)... but you all know you want an account on the super amazing briefcase computer in my cupboard really ;)

Share this post


Link to post
Share on other sites

cool. when i get my net connection on permanantly i'll prolly get my server running FreeBSD - so there will be a lot of PMs heading your way :lol:

460634[/snapback]

 

lol not a problem, feel free! (why aint it on permanently at the moment? )

 

yea infinite loops can be fun. ;) hehe :ph34r:

460635[/snapback]

 

lol they're great!

Share this post


Link to post
Share on other sites

lol not a problem, feel free! (why aint it on permanently at the moment? )

 

well, we use the net on more than one computer at home, and only have a couple of usb modems, but my dad's getting a modem/router in a couple of days :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...