Professional Web Applications Themes

php and console - PHP Development

hello all, i'm doing a program that run in console (ms-dos prompt), but i have 2 smalls problems: 1) how can i clear the screen? i tryed with system("cls") but doesn't work 2) how can i colorize the output of echo ? thanx all Dade...

  1. #1

    Default php and console

    hello all,
    i'm doing a program that run in console (ms-dos prompt), but i have 2 smalls
    problems:

    1) how can i clear the screen? i tryed with system("cls") but doesn't work
    2) how can i colorize the output of echo ?

    thanx all
    Dade


    Dade Guest

  2. #2

    Default Re: php and console

    Dade wrote:
    > 1) how can i clear the screen? i tryed with system("cls") but doesn't work
    There is no such command. But you can just echo enough empty lines to
    clear the screen.

    greetings Christian
    Christian Fersch Guest

  3. #3

    Default Re: php and console


    "Christian Fersch" <Chronialweb.de> ha scritto nel messaggio
    news:cb41ar$tc5$05$1news.t-online.com...
    > Dade wrote:
    > > 1) how can i clear the screen? i tryed with system("cls") but doesn't
    work
    >
    > There is no such command. But you can just echo enough empty lines to
    > clear the screen.
    >
    > greetings Christian

    Dade Guest

  4. #4

    Default Re: php and console


    "Christian Fersch" <Chronialweb.de> ha scritto nel messaggio
    news:cb41ar$tc5$05$1news.t-online.com...
    > Dade wrote:
    > > 1) how can i clear the screen? i tryed with system("cls") but doesn't
    work
    >
    > There is no such command. But you can just echo enough empty lines to
    > clear the screen.
    >
    > greetings Christian
    yes, i also thought to this solution, the problem is move the cursor in the
    top - left position ....

    thanx
    Dade


    Dade Guest

  5. #5

    Default Re: php and console

    Dade spilled the following:
    >
    > "Christian Fersch" <Chronialweb.de> ha scritto nel messaggio
    > news:cb41ar$tc5$05$1news.t-online.com...
    >> Dade wrote:
    >> > 1) how can i clear the screen? i tryed with system("cls") but doesn't
    > work
    >>
    >> There is no such command. But you can just echo enough empty lines to
    >> clear the screen.
    >>
    >> greetings Christian
    >
    > yes, i also thought to this solution, the problem is move the cursor in
    > the top - left position ....
    A better solution would be to use the ANSI emulation available in MS-DOS
    through Windows XP.

    See [url]http://is-it-true.org/nt/utips/utips181.shtml[/url] for instructions on how to
    enable it.

    You'll also need to know what codes to send to do particular things - the
    right way of doing it would be to use the ncusrses library but installing
    it on Microsoft is likely to be a pain. At
    [url]http://www.evergreen.edu/biophysics/technotes/program/ansi_esc.htm[/url] there is
    a well explain list of what sequences perform what operations.

    (PHP supports binary strings)

    HTH

    C.
    Colin McKinnon Guest

  6. #6

    Default Re: php and console

    Quote Originally Posted by Dade View Post
    hello all,
    i'm doing a program that run in console (ms-dos prompt), but i have 2 smalls
    problems:

    1) how can i clear the screen? i tryed with system("cls") but doesn't work
    2) how can i colorize the output of echo ?

    thanx all
    Dade
    1) First you need to know how you clear screen (Linux: clear, windows: cls) and then you could execute <?php passthru('clear');?> for example

    2) You could use Ansi but I don't know if it works in windows console
    rvntone is offline Junior Member
    Join Date
    Sep 2011
    Location
    Ecuador
    Posts
    1

Similar Threads

  1. Console Isn't Working
    By N[e]RD in forum Macromedia Flash Flashcom
    Replies: 0
    Last Post: January 20th, 02:54 AM
  2. Console.Out inside IIS
    By Mike Schilling in forum ASP.NET Web Services
    Replies: 0
    Last Post: December 17th, 08:49 PM
  3. console app w/o seeing console?
    By Kris Rudin in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: November 11th, 10:23 PM
  4. Logging to /dev/console
    By Wes Bailey in forum PHP Development
    Replies: 1
    Last Post: August 9th, 01:49 AM
  5. i need to run Recovery Console on a OEM
    By scott in forum Windows Setup, Administration & Security
    Replies: 1
    Last Post: July 9th, 08:49 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139