How to define a variable in JavaScript with PHP echo function?

前端 未结 7 1394
囚心锁ツ
囚心锁ツ 2020-12-18 13:33

How do I define a variable in javascript with echo function, from the external php file?

We have theconfigfile.php, thejsfile.js an

7条回答
  •  清酒与你
    2020-12-18 14:17

    In thephpfile.php,

    
    
    
    
    
    

    Then you can access it with config.url in your javascript.

提交回复
热议问题