0
votes

5 and I am using a jumi component to run php file. some of the files were running perfectly but some are not specialy when im using require_once function. The errors are showing the following:

Warning: require_once( http://bphf2012.org/..._jumi&fileid=10 ) [function.require-once]: failed to open stream: No such file or directory in/home/content/13/10377813/html/components/com_jumi/views/application/view.html.php(40) : eval()'d code on line 21

Fatal error: require_once() [function.require]: Failed opening required ' http://bphf2012.org/..._jumi&fileid=10 ' (include_path='.:/usr/local/php5_3/lib/php') in/home/content/13/10377813/html/components/com_jumi/views/application/view.html.php(40) : eval()'d code on line 21

How to fix the problem?

2

2 Answers

0
votes

The require_once method you are using is not for external URLS. There is a distinction between local files and external files. You are trying to require a external file. For an external file (in this case a webpage) you could use curl (http://php.net/manual/en/book.curl.php) or file_get_contents (http://php.net/manual/en/function.file-get-contents.php)

if the file is on your local disk, require+once the filepath on your disk to it.

require('/home/content/13/10377813/html/components/com_jumi/views/application/view.html.php')

0
votes

If you really want to include remote files, set allow_url_include to On.

Read more here - including a remote file in PHP