rmap
rmap

Reputation: 65

using jQuery to load a php file and the php file includes

This may be a "stupid" question but ...

If I use JQuery .load(); etc to load a page into a is there a way that I can pass a php config file data to it without having to redeclare it? At the moment I am having to load the config files etc into the loaded page as well as on the page it loads into.

e.g.

In the head of page1.php - require('config.php'); then if I load page2.php into a on page1 I have to call config.php on page2.php aswell but is there a way that I don't have to?

Upvotes: 1

Views: 381

Answers (1)

Nick Craver
Nick Craver

Reputation: 630409

Nope, you're talking about a client request to get part of a page, loading part of the initial page that may have server-side variable really isn't what .load() is designed for.

Upvotes: 4

Related Questions