answersLogoWhite

0

How do you delay a PHP script?

Updated: 9/18/2023
User Avatar

PaulJanaway

Lvl 1
14y ago

Best Answer

To delay a script in seconds you would use the sleep() function as shown below:

<?php

echo "hello";

sleep(5); // delays the script for 5 seconds

echo "finished";

?>

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you delay a PHP script?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How can you run a PHP script?

A php script can only be executed within a Web server that runs php.


What are semantics in PHP?

In PHP, semantics refer to the meaning of code or how statements are interpreted by the PHP engine. It involves understanding how code functions and interacts with other elements in a PHP script. Proper semantics ensure that the code behaves as expected and follows the established rules of the PHP language.


How do you create a web mail script using PHP?

You can use phpMailer() Or, you can use mail() PHP function to send emails via PHP script.


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

Open the PHP script and delete the PHP from it.


How do you create a PHP script?

To create a PHP script all you have to do is create a new file, then save the file as "filename.php". It must have a .php file extension.After that open the file and put in the PHP tags like shown.Then you write your PHP script within those tags and upload to your web space and check it out.


How can you execute a PHP script using command line?

2 Methods: 1. You execute your php binary (in linux, make sure you have php-cli installed) and pass the script as an argument. EG ($: /usr/bin/php /home/user/script.php) 2. A sh'bang in the first line of your script, with the full path of your php executable: #!/usr/bin/php -q &lt;?php ScriptStuff(); ?&gt;


Can you provide free web hosting on a site from a PHP script?

If you created a PHP script that could provide that for people then yes you could.


How do you use PHP in HTML?

You can't use PHP in an HTML document, but you can use HTML in PHP script.


Where can i find information about some custom PHP script?

There are lots of PHP script in market which you can easily customize as per your requirement. Some of the best PHP scripts available at reasonable price can be found on this website


How do you do the pass the variable value to the query in same php page?

To pass PHP Variable value in Jquery simpley echo that variable : Eg &lt;script&gt; var jQueryVariable=&lt;?php echo $anyVariable?&gt; &lt;/script&gt;


What is a parse error in php?

Parse error in PHP means that your script is invalid - it is not compliant with the programming language specification. After parse error script is no longer executed.


Where can you buy a script?

When you say script, what do you mean exactly? If you mean php or code script, you should search on seoclerk.com