Reputation: 18175
I have done and installed PHP extension skeleton.so
according manual with function :
void helloWorld (Php::Parameters ¶ms)
{
std::string name=params[0];
std::cout<<"Hello "<<name<<"!"<<std::endl;
}
It works fine if I call php from command line:
php scr.php
scr.php content:
echo helloWorld('Taylor');
But I can't make it run on web page. web page content:
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php
echo helloWorld('Taylor') ;
?>
</body>
</html>
Page is empty.
How to enable PHP extension in web page?
Upvotes: 1
Views: 147
Reputation: 317
what errors are appearing in the error log?
have you restarted your web-server to make sure it's picked up the new extension is loaded?
if you do
<?php
phpinfo();
?>
in your web page does it indicate that extension is loaded?
Upvotes: 1