+ 4
There is way too see php code on web page?
How can I See My PHP Code When I View Source?
28 odpowiedzi
+ 9
Nope. PHP produces the HTML you see when you view source, but it is not the source itself. The PHP code is stored on the server, and you can only view it from there.
+ 11
I don't believe php code can be viewed on the browser.
https://www.thoughtco.com/why-dont-see-code-viewing-source-2694210
+ 7
The php code can be entered and viewed on an editor and stored on the server. Once the page is viewed on the browser, all you see is the resulting html. You can still use an editor on the original source code file to view and modify the PHP.
+ 6
In fact if you do something like
<?php
echo "text1 /n <br>";
echo "text2 /n <br>";
the two text's would be seperate lines:
1. On the generated client's side html code because of the /n newline characters.
2. On the rendered html page because of the <br> line break elements
+ 3
Javascript is alternative
+ 2
and how then to insert the PHP request into the page?
+ 2
Yes, I made a little mistake, when you open a file from the server, we see this code, but on the web page the client does not
+ 2
://You have to look on server panel otherwise you can't view PHP code in View source option
+ 1
So i return to my q...
How can i see php code of any website in my side...
+ 1
and what if you try to download the entire site entirely to your computer? for example using the program WinHTTrack website copier, cyotek webcopy, teleport pro, webcopier...
+ 1
You Cannon see php because its server side language, it executed over the server and gives only result to client
+ 1
I more in detail googled this question, it turns out this impossible do, need direct FTP access to hosting. the only option is to use ready-made scripts in the public domain
+ 1
As I know, we can't see php on web page. Because server generate html code from php to show the contents to the users.
0
right click in the browser on an empty space on the web page -> select "view page code"
0
I never see php code in that way
I mean if i open any web page the php code gone
0
not all web pages use this code
0
Can you send me web page that use php? That I will try see
What the most code that use to alternative php?
0
This page made in php
<?php
$pages = array(
0 => array('title' => 'Первая страница', 'body' => 'Первый текст'),
1 => array('title' => 'Вторая страница', 'body' => 'Второй текст')
);
$page_id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; //возьмем номер из запроса
if (!isset($pages[$page_id])) $page_id = 0; //проверим что такая страница есть - если нет - 0 по умолчанию
$page = $pages[$page_id];
?>
<html>
<head>
<title><?php echo $page['title'];?></title>
</head>
<body>
<a href="?id=0">Главная</a>
<a href="?id=1">Вторая</a>
<?php echo $page['body'];?>
</body>
</html>
0
But if i run it and try to see the code...the php will gone
0
to run the code you must have a properly configured web server. do you have any idea what this technology is?