answersLogoWhite

0


Best Answer

There must be a statement in the file which calls the function

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why PHP function is called when page is loaded?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the function die used for in PHP?

The function die() stops the script from running. See the example below: <?php die("this text will be outputted on the page"); echo "this text will not be shown due to the script ending when the die() function was called"; ?>


How do you create a cookie and where will it placed in php?

You can set a cookie using the setcookie() function. You can do this as many times as you wish during your script. Remember that the cookie will not be available to PHP until the next time the page is loaded (or the script is called by a new HTTP request). On the next page, you can access the cookie data from the $_COOKIE super-global array. The key will be the name of the cookie, and the value will be the value you assigned to it the last time you set it.


What is a PHP file?

A PHP file is a text file containing code to be run on a webserver by a program called php. It's the most used dynamic page script engine as it is free and open source.Use the fopen() function to open files in PHP. The first parameter of this function is the file to be opened and the second parameter specifies in which mode the file should be opened


How do you use a function with a button in PHP?

A simple function call <html> <body> <?php if(isset($_POST['button'])) { setValue(); // Function is called } function setValue() { echo "<br>The button property to call PHP function works"; // Your code here } ?> <input type="submit" name="button" onclick=<?php $_SERVER['PHP_SELF']; ?> /> </body> </head>


How do you check which extensions are dynamically loaded in PHP?

AnswerTo get the list of currently loaded extensions within a PHP program. Use get_loaded_extensions() function.To check what extensions are loaded by PHP on a given server, type this on the command line:php -mHere is a php script that will list the loaded extensions in a table. Save this file as phpext.php and place it on your website. Go to this file in your web browsers and see a list of loaded extensions:


How do you get the url in a php website?

Copy the URL with the .php, The .php is part of the page.


How do you write homepage module in php?

A home page can be any php script. The most common used name for the 'home page' is the file called index.php in the public_html folder of your web host.


How do I get rid of PHP in Charter's home page?

Open the PHP script and delete the PHP from it.


What is exactly stands for php?

In the beginning, it was called PHP/FI for "Personal Home Page / Forms Interpreter". Then when the project got bigger it was renamed into the form "PHP: Hypertext Preprocessor", a recursive acronym.


What is the full name of PHP?

PHP=> Personal Home Page


How do you create function in php?

they're called user-defined functions, this is the syntax: function the_user_defined_name() { the code you want here }


What is about php function?

A php function is coding that can be called multiple times to repeat a task. function add_numbers($num1,$num2) { return $num1 + $num2; } this would add two numbers together when called, so when you call $x = add_numbers(1,3); echo $x; //displays 4