note 102395 added to function.system

[email protected] Fri, 11 Feb 2011 07:32:12 -0800
Newsgroups php.notes
Message-ID <[email protected]>
I was trying to get the server-side to beep in windows 7.  I finally found something that would work without creating my own EXE.

Create a batch file with at the CMD prompt type:
 
   echo @echo (Alt-7)>beep.bat

Then execute it in PHP with:

   exec ('start /MIN c:\your_path_here\beep.bat');

NOTE: The only drawback I can find is that a cmd.exe does visually flash on the system (which is why I used the /MIN to ensure it only goes to the taskbar).  Not really sure why I don't like that, but it was a side effect that I wasn't looking for.
----
Server IP: 69.147.83.197
Probable Submitter: 99.236.26.180
----
Manual Page -- http://www.php.net/manual/en/function.system.php
Edit        -- https://master.php.net/note/edit/102395
Del: integrated  -- https://master.php.net/note/delete/102395/integrated
Del: useless     -- https://master.php.net/note/delete/102395/useless
Del: bad code    -- https://master.php.net/note/delete/102395/bad+code
Del: spam        -- https://master.php.net/note/delete/102395/spam
Del: non-english -- https://master.php.net/note/delete/102395/non-english
Del: in docs     -- https://master.php.net/note/delete/102395/in+docs
Del: other reasons-- https://master.php.net/note/delete/102395
Reject      -- https://master.php.net/note/reject/102395
Search      -- https://master.php.net/manage/user-notes.php