-1
我想說明一個JavaScript函數* *外的標籤和,裏面的標籤工作,但我需要了出來。秀功能的JavaScript在PHP
如何通過?在WordPress
我的代碼PHP:
function custom_shortcode3() {
$conecta3 = mysql_connect("localhost", "mcommerce", "kaishek") or print (mysql_error());
mysql_select_db("mcommerc_whmcs", $conecta3) or print(mysql_error());
function mysql_get_var3($query,$y=0){
$res = mysql_query($query);
$row = mysql_fetch_array($res);
mysql_free_result($res);
$rec = $row[$y];
return $rec;
}
?>
<html>
<div id="show"></div>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
function total() {
setInterval(function() {
$('#show').load('datatotaldeprodutos.php')
}, 1000);
};
<?
echo "total();"; //WORK BUT NOT APPEAR IN WORDPRESS
?>
</script>
</html>
<?
echo "total();"; //NOT WORKKK
echo "test"; //WORK, APPEAR IN WORDPRESS. i need the function appear
}
add_shortcode('totaldeprodutos', 'custom_shortcode3');
_ * outside * the tags_?那是什麼意思 ? – Rayon
echo「total();」;在標籤