Jump to content
php.lv forumi

Execute


Vilsol

Recommended Posts

šis topiks būs par execute komandu un tai līdzīgajiem...

 

Tātad cik saprotu execute() ir priekš linux... piemēram ja gribu palaist serveri vai viņu izslēgt php skriptā ir jārakste execute()... bet problēma tāda ka esmu windows lietotājs... varbūt ir kāda pavisam vienkārša funkcija kā to izdarīt jo pēc būtības gribu panākt ko tādu... ka es ieejowt webā noteiktā lapā nospiežu pogu "Palaist Serveri" un viņš palaižās un kad gribu to izslēgtnospiežu uz pogas "Izslēgt serveri" un viņš izslēdzas...Paldies jau iepriekšsssss

Link to comment
Share on other sites

es jau tagad sapratu kaa visu palaishanu izdariit bet tagad probleema taada ka man vinsh to programmmu palaizh foonaa karoche es vinju nevaru kontroleet straaadaa tikai vinja process

scrips shaads

<?
exec("C:/AppServ/www/oldschool/StartServer.cmd");
echo 'Izdevās ieslēgt serveri';
?>

Link to comment
Share on other sites

es jau tagad sapratu kaa visu palaishanu izdariit bet tagad probleema taada ka man vinsh to programmmu palaizh foonaa karoche es vinju nevaru kontroleet straaadaa tikai vinja process

scrips shaads

<?
exec("C:/AppServ/www/oldschool/StartServer.cmd");
echo 'Izdevās ieslēgt serveri';
?>

ko mokies nem shellu uzreiz un miers :D

Link to comment
Share on other sites

Vilsol - Kādu tik tiešām "serveri" tu vēlies "palaist"?

ķaunter štraik?

 

jap ķaunter sraiķu... lieta tāda palasot php.com pamācības skatījos un sapratu, ka senākajās versijās logs vienmēr ir uzlecis augšā un daudziem iztraucējis darbu tapēc viņi to funkciju ir noņēmuši pavisam :( ciuk šēl varbūt kādas citas idejas...

Link to comment
Share on other sites

Nu bet exec nepalaiž programmu kā tādu!

exec()

exec() executes the given command.

...

If the output argument is present, then the specified array will be filled with every line of output from the command. Trailing whitespace, such as \n, is not included in this array. Note that if the array already contains some elements, exec() will append to the end of the array. If you do not want the function to append elements, call unset() on the array before passing it to exec().

Vispār, nesaprotu jēgu windows aplikācijas ar UI palaišanai caur PHP.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...