wsdl cache enable disable php example - soap.wsdl_cache_enabled
wsdl-cache-enable-disable-php-example.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>wsdl cache enable disable php example - soap.wsdl_cache_enabled</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Md Iqbal Hosan">
<meta name="title" content="wsdl cache enable disable php example - soap.wsdl_cache_enabled">
<meta name="keywords" content="php, example, code, array, function, apache, soap, wsdl_cache_enabled">
<meta name="description" content="wsdl cache enable disable php example - soap.wsdl_cache_enabled">
<style>
h2, h4{background:orange; color:#000084;}
h2{ padding:3px; margin:3px; font-size:22px;}
h4{ padding:2px; margin:2px; font-size:19px;}
p{padding:2px; margin:2px; color:#0099FC;}
body{ background:#FFFFFB;}
</style>
</head>
<body>
<h2>wsdl cache enable disable php example - soap.wsdl_cache_enabled</h2>
<pre>
<?php
/*
------------------------------------------------------------------------------------------
let say we would like to check whether wsdl cache is enable or disable in this web server
we can do check by using phpinfo() php function
------------------------------------------------------------------------------------------
*/
//echo "<h4>Server information using phpinfo() php function :</h4>";
//echo phpinfo();
/*
------------------------------------------------------------------------------
now we would like to change wsdl cache enable to disable or disable to enable
we can do this by editting php.ini file like this :
for enabling cache : soap.wsdl_cache_enabled=1
and for disabling cache : soap.wsdl_cache_enabled=0
------------------------------------------------------------------------------
*/
/*
------------------------------------------------------------------------------
now we would like to enable wsdl cache dynamically at the run time
we can do this by editting php.ini file at run time
------------------------------------------------------------------------------
*/
echo "<h4>WSDL cache enable at run time:</h4>";
$wsdlCacheEnable = ini_set("soap.wsdl_cache_enabled","1");
if($wsdlCacheEnable)
{
echo "<p>wsdl cache enable at run time success</p>";
}
else
{
echo "<p>wsdl cache enable at run time failure</p>";
}
/*
------------------------------------------------------------------------------
now we would like to disable wsdl cache dynamically at the run time
we can do this by editting php.ini file at run time
------------------------------------------------------------------------------
*/
echo "<h4>WSDL cache disable at run time:</h4>";
$wsdlCacheDisable = ini_set("soap.wsdl_cache_enabled","0");
if($wsdlCacheDisable)
{
echo "<p>wsdl cache disable at run time success</p>";
}
else
{
echo "<p>wsdl cache disable at run time failure</p>";
}
?>
</pre>
</body>
</html>

No comments:
Post a Comment
leave your comments here..