Hi, this simple class dont show the message And... i don
t know why
[php]
public function accion(){
echo "Hola";
}
}
$p=new persona();
$p->accion();
?>
[/php]What comes out on the browser is
accion(); ?>
Hi, this simple class dont show the message And... i don
t know why
[php]
public function accion(){
echo "Hola";
}
}
$p=new persona();
$p->accion();
?>
[/php]What comes out on the browser is
accion(); ?>
I tested your code and it worked perfectly, Shows Hola…
As you can see here.
Then the problem most be on xampp
I put this route
http://localhost/ejercicios_basicos/clase.htm
What is going on?
Try renaming the extension from .htm to .php
I don’t know much about xaamp, but if it’s anything like IIS, you’ll have to tell your xaamp server to execute .htm files with PHP.
This is what you need to do to make xaamp run .htm as php.
Stop the apache service, then add one change in c:\xampp\apache\conf\httpd.conf in the section by adding…
AddType application/x-httpd-php .html .htm
Restart apache!
it worked, thanks man