Hi there, I want to grab a page from my site that's PHP, however, I don't want it to display the PHP...
How can I do this?
GigsD4X 0 Light Poster
Recommended Answers
Jump to Post— vibhaJ 126Below is example to get Google's content.
<?php $homepage = file_get_contents('http://www.google.com/'); echo $homepage; ?>Is this what u want?
Jump to Post— vibhaJ 126echo file_get_contents("./data.php");code will not display any php tag. It shows HTML output of file data.php.
You want to display php tag also?
Jump to Post— vibhaJ 126how could it display php tags? its a scripting language and when you echo it it automatically executed.
Post your exact output if issue is still not solved.
Jump to Post— mschroeder 251how could it display php tags? its a scripting language and when you echo it it automatically executed.
Post your exact output if issue is still not solved.-vib
That is not true. When you use something like file_get_content() it does not parse/execute what it reads in. If you included …
All 13 Replies
vibhaJ 126 Master Poster
GigsD4X 0 Light Poster
vibhaJ 126 Master Poster
GigsD4X 0 Light Poster
vibhaJ 126 Master Poster
GigsD4X 0 Light Poster
vibhaJ 126 Master Poster
mschroeder 251 Bestower of Knowledge Team Colleague
vibhaJ 126 Master Poster
GigsD4X 0 Light Poster
FlashCreations 20 Posting Whiz
vibhaJ 126 Master Poster
GigsD4X 0 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.