Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am currently trying to use the php function 'include' to include an external url. This is so that whenever the webpage is updated it will automatically update mine. The trouble I'm having however is that I keep getting an error saying the following...

Warning: require() [function.require]: http:// wrapper is disabled in the server configuration by allow_url_include=0 in C:wampwwwstarterpackstarterpack2header.php on line 48

I have tried to find a way to fix this error or find a way around it but cannot find one. Does anyone have any ideas?

P.S I am building the site using wampserver, could permissions of the wampserver be causing this error?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
499 views
Welcome To Ask or Share your Answers For Others

1 Answer

You would be better using echo file_get_contents($url) as the include statement could execute any PHP code returned by the other site.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...