How to embed php script in javascript?

前端 未结 6 887
余生分开走
余生分开走 2020-12-11 12:26

I want to know if I can include php scripts in javascript[1] the same way it can be done in html[2]

server.php:


        
6条回答
  •  猫巷女王i
    2020-12-11 12:51

    You cannot have a client load PHP. The only way you can do this is to have on server.php

    
        
              
        
        
        
    
    

    Basically loading the javascript into the body of the page. Or alternatively.

     
        
              
              
    
                                     
                  
提交回复
热议问题