PDA

View Full Version : Importing PHP scripts


Drunkacho
11-14-2005, 04:56 PM
Hey guys, does anyone have the php include code for vB? Here's an example of what I'm looking for, but it doesn't work with those tags

<?php include("http://www.blah.com/test.php"); ?>

Thanks in advance!

Marco van Herwaarden
11-15-2005, 05:50 AM
You don't use an url when including, but a path to the php-file.

Sparkz
11-15-2005, 07:05 AM
You don't use an url when including, but a path to the php-file.
This is not correct.
Depending on the configuration of PHP, it is possible to pass a URL.


If "URL fopen wrappers" are enabled in PHP (which they are in the default configuration), you can specify the file to be included using a URL (via HTTP or other supported wrapper - see Appendix M for a list of protocols) instead of a local pathname. If the target server interprets the target file as PHP code, variables may be passed to the included file using a URL request string as used with HTTP GET. This is not strictly speaking the same thing as including the file and having it inherit the parent file's variable scope; the script is actually being run on the remote server and the result is then being included into the local script.