require_once() using a url, how do I enable it in the server

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: require_once() using a url, how do I enable it in the se

Post by Celauran »

I'm not familiar with IIS, so I don't know what you need to set where. What I'm saying is the code you have posted looks fine and I would expect it to work. The only unknown in the code is requiring/including files over HTTP, hence the request to try including a local file as a local file.
PHPHelpNeeded
Forum Commoner
Posts: 83
Joined: Mon Nov 17, 2014 8:03 pm

Re: require_once() using a url, how do I enable it in the se

Post by PHPHelpNeeded »

lets just leave it at that.

Lets just say, that I don't want to include a file by url include() anymore.

Because the entire site will be *.php, of course with some html in it, but mainly with php code it in, how can I relay or make available the class libraries to client side files that requires them, when the class libraries are located at server side?

any idea, regardless of how difficult, I am will to learn or explore.

Word of advice, if the concept or answer is too difficult and brow, just name a concept as to how it can be done, and then I will research it and find out on my own as to how I can accomplish it.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: require_once() using a url, how do I enable it in the se

Post by Celauran »

The class libraries are only required by the server. PHP code doesn't run client side. Have you tried what I suggested? Did it work? Again, the code you've posted looks right and should work. What's your server setup like? How are you accessing the site? The more information we have, the better we'll be able to get to the bottom of this.
PHPHelpNeeded
Forum Commoner
Posts: 83
Joined: Mon Nov 17, 2014 8:03 pm

Re: require_once() using a url, how do I enable it in the se

Post by PHPHelpNeeded »

hold on.
Post Reply