Home >Backend Development >PHP Tutorial >Jquery引用php变量出错,怎么解决

Jquery引用php变量出错,怎么解决

WBOY
WBOYOriginal
2016-06-13 10:52:50776browse

Jquery引用php变量出错,如何解决?
如下:
 
 
 
 $_stable='wo';
 $year='2012';
 echo  
DRR;
?>

总是提示wo未定义,但是将$_table改成数字就没问题,什么原因,怎么解决?新手,谢谢

------解决方案--------------------
$.post("modules/auto.php",{action:"ac",stable:'$_stable',year:$year},function(data){
------解决方案--------------------

PHP code
$.post("modules/auto.php",{action:"ac",stable:'$_stable',year:$year},function(data){<br><font color="#e78608">------解决方案--------------------</font><br>因为它是字符串 ,所以要加引号。<div class="clear">
                 
              
              
        
            </div>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn