tags:

views:

28

answers:

1

Does anyone know why my localhosted files appear like this?

http://109.236.82.36/upload/

Everything is undefined, the defined variables aren't working.

Am I supposed to enable a plugin in xampp to get it to work?

+1  A: 

PHP short tags must be disabled. If you check the source of your generated page, you'll notice that the img tags have src values like

<?=$website?>/images/hitpoints.gif

You have two options here. Either change the code to

<?php echo $website ?>/images/hitpoints.gif

or enable short tags in php.ini. You can get help on the second option using google.

I strongly suggest the first one as short tags are going to be chucked in future versions of PHP incompatible with XML documents and make code less portable.

Nithesh Chandra
Thanks a lot:) Fixed it.
Kyle
+1 for the correct answer, -1 for the short-tags-getting-removed-stuff. i've heard that the asp-style-tags will be disabled with php6 (but i'm not sure) - but never heard about the short-tags getting removed. can you please provide some (official) sources? after that, i'll vote you up.
oezi
I guess you are right. There's no official declaration that short tags are going to chucked, but since they are disabled by default in 5.3, code using them may not be very portable. Also, if you are dealing with XML documents, it conflicts with the "<?xml" declaration.
Nithesh Chandra