• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

PHP-display the code

jestem pro

That is the question
Joined
Apr 20, 2013
Messages
650
Solutions
14
Reaction score
88
Hello, I want to display my php code by localhost, but when I do that it shows me the code, not the result.

I'm using Xampp or Wampserver.

Could someone explain me on one of them.

For example:
PHP:
<?php
class display
{
   function displayReverse ($a=array())
   {
       $dl=count($a);
       for ($i=$dl-1;$i>=0;$i--){echo $a[$i].' ';}
   }
}
$xtr=new display();
$tab=array(12,15,1,6,22,6,34,9,4,1);
$xtr->displayReverse($tab);
?>
 
Solution
Are you saving these files in htdocs? Do you have the server running? Are you loading them in the url by means of localhost? Or are you using open with to launch these files?
Are you saving these files in htdocs? Do you have the server running? Are you loading them in the url by means of localhost? Or are you using open with to launch these files?
 
Solution
Back
Top