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

Categories

0 votes
524 views
in Technique[技术] by (71.8m points)

php include to external url

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

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

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...