Php 如何在Ajax调用期间包含该文件
我将核心php用于一个应用程序,因为我有一些视图、类和javascript文件 视图结构:Php 如何在Ajax调用期间包含该文件,php,jquery,ajax,Php,Jquery,Ajax,我将核心php用于一个应用程序,因为我有一些视图、类和javascript文件 视图结构: include('header.php'); //header file is included with config file include('class.php'); <body> include('fotter.php'); //footer file include('header.php')//头文件包含在配置文件中 包括('class.php'); 包括('fotter.p
include('header.php'); //header file is included with config file
include('class.php');
<body>
include('fotter.php'); //footer file
include('header.php')//头文件包含在配置文件中
包括('class.php');
包括('fotter.php')//页脚文件
当要求查看是通过重定向的时候,一切都很好
问题:
当我想通过ajax调用包含类的某些函数时,我需要通过检查ajax调用来包含类上方的配置文件
如何在ajax调用期间使用预包含的文件本身。
请帮助…简而言之-您不能将
*.php
文件包含在JavaScript
中。您不会遇到我的问题-除了通过ajax或重定向调用之外,还有什么方法可以让类始终使用配置文件。