answersLogoWhite

0


Best Answer

May be this example will help. Please focus on where ob_implicit_flush(true) and ob_end_flush(); are placed in your code.

Version 1:--------------------------------

<?PHP

ob_implicit_flush(true);

ob_end_flush();

?>

e

<div>a<div>a</div>

<?PHP sleep(1); ?>

<div>b</div>

<?PHP sleep(1); ?>

c</div>

Version 2:------------------------------

<?PHP

ob_implicit_flush(true);

ob_end_flush();

?>

e<div>a<div>a</div></div>

<?PHP sleep(1); ?>

<div>b</div>

<?PHP sleep(1); ?>

c</div>

Version 3:------------------------------

<?PHP ob_implicit_flush(true);

ob_end_flush();

?>

e<div>a<div>a</div><!--</div>-->

<?PHP sleep(1); ?>

<div>b</div>

<?PHP sleep(1); ?>

c</div>

?>

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How can you see the php code that is executed in your browser?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Why you do not see any PHP code when you view the source code of a PHP page in the browser?

PHP is server-side, the browser itself does not interpret it. Rather, the browser sends a query to the server, and the PHP scripting generates custom HTML document. It is this HTML that you are seeing the source code of.


Why use die in php?

die(); ends the program running. Any code after die(); will not be run if die(); is executed. Let's say you want to see if a user is logged in. If they're not, you want to stop executing code. if(!$user_is_logged_in) { die(); } else { // execute your program } die(); is equivalent to exit(); Be careful, however, because if die(); is executed, ANY code, PHP, HTML, etc., will not be executed. For example: "Hello, this is &lt;?php die(); ?&gt; a program." will print "Hello, this is"


Why does your browser try to save rather than open your PHP scripts?

PHP is a server-side scripting language, which means that scripts are interpreted and executed by the server before PHP pages are sent to the client (the browser). The server replaces PHP scripts with the output it obtains from their execution and then transmits to the client the output thus obtained. Hence, your browser cannot execute PHP scripts, but it can only request PHP pages from a server which runs the scripts. Because the server is what processes the script, PHP needs to be installed on the server for the server to be able to process PHP scripts. If PHP isn't installed, the server has no idea that "foo.php" is a PHP script so just sends it to the browser as an executable - in a way that forces the browser to prompt to download it. Consult your hosting provider's help for installing, setting up or enabling PHP. Alternatively, you can install it yourself if your host provides the permissions to (See the related questions for installation help). If your host does not provide PHP support, find another host.


Why you don't see any PHP code when you view source code of PHP page in browser?

PHP is a Server-side HTML embedded scripting language. It means you can embed you PHP Code in HTML template.When ever Server finds &lt;?php ?&gt; , it always process the code and generate the HTML output. Example:How "Hello World" get displayed on browser. Consider "hello.php" contain &lt;?php echo '&lt;b&gt;Hello World&lt;/b&gt;'; ?&gt; . "hello.php" is placed in your server root directory. 1. Client make a request to file. http://localhost/hello.php. Please notice local host may be replaced with your server URL like http://www.myworld.com/hello.php 2. Server receives the request and process "hello.php" . Hence , &lt;b&gt; Hello World&lt;/b&gt; HTML output is generated. 3.Server return the output to client. 4.Client [Browser] receive and display the output Hence when we view source we never able to get the PHP Code.


Can safari open php files?

PHP is processed on the server side, not the browser side. This means that any browser (including Safari), never actually opens a PHP file (unless it's loaded locally rather than served from the web, in which case it would be read as a plain text file). Instead, it receives the output from the server that contains the PHP file. For example, if you have a PHP file that reads like this: &lt;?php echo "&lt;html&gt;\n&lt;body&gt;\nI am the lizard queen!\n&lt;/body&gt;\n&lt;/html&gt;"; ?&gt; Safari would actually see it as plain HTML, like this: &lt;html&gt; &lt;body&gt; I am the lizard queen! &lt;/body&gt; &lt;/html&gt; It would never actually see the PHP code itself.


How can you check if your PHP script is working on a server?

After you have uploaded it to your web host just go to the page in your browser and then you will see if it is working or not.


How run php?

I have provided you with a two links that will take you through how to install PHP on your computer and how to setup a server so you can run your PHP code. See the relevant link below


Code keeps appearing after hitting submit on the form to email in PHP are there any suggestions?

There must be an error in the PHP script. Your have to check it to see what's wrong.


How do you view the actual code that makes up a web page?

technically spoken, source code is everywhere, because every web page you open in your browser is source code that is interpreted by your browser and displayed following certain rules. every browser I can think of has a "display source code" option somewhere (mostly in the "Views" section) that allows for displaying the pages source code, although you won't be able to see the source code of scripting languages like PHP or Ruby in the browser with this function.


What is difference between java Front end developer and Back End developer?

An example of a back-end language is PHP, which is a scripting language. When a PHP page is requested, the server reads any PHP code and renders the markup. The result is HTML that is sent to you. You, the web page viewer, never see one line of PHP code. Assuming that the web server administrator has done his or her job correctly, the server would and could never show you the actual PHP code. It is parsed when the page is served up and the result of that code are turned into HTML.Front End Programming LanguagesJavaScript is probably the most commonly used front-end web development language. It is a scripting language and unless you explicitly have JavaScript disabled in your browser, you see and interact with JavaScript every day. When you request a web page, the JavaScript is either in the page, or is downloaded in a separate file. JavaScript runs in your browser. Most associate JavaScript with the annoying pop-up ads that we all find very annoying. This was true in the past, but today, JavaScript plays an integral part in creating rich user experiences.


Why you can not see the code in the server side?

The code on the server-side of website is not visible on most websites because it is not intented to be viewed. That code is intented to be parsed by the server and related code compiled, ran by the compiler and the generated output is then served as the website content. When you visit a website, your primary goal is to use it, not view the code behind. When you request a web page, The requested page source is retrieved and first processed by the web server. Processing includes converting server side scripting to the code that is sent to the web browser client. This happens with PHP scripting. The results are sent to the web browser. The web browser than processes the page for displaying including the processing of javascript and java code You can only view the source code seen by the web browser. That is not the same as the original page image that is stored on the server.


Difference between the contents of the HTML file and what you see in the browser?

HTML or Hypertext Markup Language is code that can be used to create a website (among other things). HTML code is nothing but text, but, when viewed in a browser, can display images referred to in the code. If the HTML code is the ingredients of a cake, the browser shows the finished and fully decorated cake.