Asked  7 Months ago    Answers:  5   Viewed   30 times

When PHP script run from command line (windows) , how can clear the console screen from script .

for example :

while(true){
    // sleep for 10 seconds , then clear the console
    sleep(10);

    // below command execute to clear the console windows
    **COMMAND**
}

 Answers

21

For Windows users :

system('cls');

For Linux users :

system('clear');
Wednesday, March 31, 2021
 
mistero
answered 7 Months ago
29

Solution:

add two settings to .bashrc/.bash_profile

alias php="/usr/local/bin/php53"
export PHP_PATH = "/usr/local/bin/php53"

and also set php_bin in Capifony's deploy.rb

set  :php_bin, " /usr/local/bin/php53"
Saturday, May 29, 2021
 
rob_mccann
answered 5 Months ago
23

I'm assuming windows since you said powershell. You can just install php on windows but that means also installing apache or enabling IIS.

Or there's apparently a built-in webserver for command-line functionality that might minimize the amount of headache involved in configuring that stuff.

This might help get you going also: http://php.net/manual/en/install.windows.legacy.index.php#install.windows.legacy.commandline

Saturday, May 29, 2021
 
Savageman
answered 5 Months ago
79

Try adding your php directory and your php extensions directory to your PATH environment variables.

Saturday, May 29, 2021
 
akohout
answered 5 Months ago
10

I found this link and it worked for me:

php_memcache-3.0.8-5.4-ts-vc9-x86.zip

Or you can browse a list of the latest releases here and find an applicable version:

http://windows.php.net/downloads/pecl/releases/memcache/

Sunday, August 8, 2021
 
sharjeel
answered 3 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :