how to get the php source code on my website

Started on the old forum in October 2017 · view the original in the archive · old links redirect here

#jquery #php

2 replies · 72 views · started 9 years ago · 1 min read

3 participants
francis alert Newbie · 1 posts #1

I'm trying to use jquery to alert the php code in my webpage but it only alert the html source using .html(),i also try replacing the "<" use in opening a php so that the browser will not render it but it is not work.

I found out this work in .html file but not in .php file,so how can i do that

<script>
$(function(){
       alert($("body").html().replace(/</g,"&lt;"));
  });
</script>
dj-coder Junior · 41 posts #2

francis alert wrote: I'm trying to use jquery to alert the php code in my webpage but it only alert the html source using .html(),i also try replacing the "<" use in opening a php so that the browser will not render it but it is not work.

I found out this work in .html file but not in .php file,so how can i do that

<script> $(function(){ alert($("body").html().replace(/</g,"&lt;")); }); </script>

You can use <?PHP echo file_get_contents("Insert Your Url With Http"); ?> ////Example file_get_contents("http://google.com");

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close