例如我www.a.com 上面有个 a.php文件,现在在别的虚拟空间上调用该文件的函数,用读文件可以,但问题多多。用 require("http://www.a.com/a.php");就报错无能应用。而我本地调用www.a.com上的文件却可以。怎么解决好呢?

解决方案 »

  1.   

    Warning: require_once() [function.require-once]: URL file-access is disabled in the server configuration in D:\wwwroot\web\tst.php on line 3Warning: require_once(http://a.com/function.php) [function.require-once]: failed to open stream: no suitable wrapper could be found in D:\wwwroot\web\tst.php on line 3Fatal error: require_once() [function.require]: Failed opening required 'http://a.com/function.php' (include_path='.;C:\php5\pear') in D:\wwwroot\web\tst.php on line 3
      

  2.   

    本地可以?真的假的啊?建议使用fopen,文件地址使用ftp协议,就可以达到你的要求。不过,建议你还是把文件放到一块吧,不然问题之多,要吓死人的。
      

  3.   

    是啊,本地调用其他网页上的函数是可以的啊,但空间调用空间就不可以啊。我用FOPEN试过,但变量可以用,函数不可以用的