SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Sep 2011
    Location
    Mumbai
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Shell exec in windows

    shell_exec function not working in windows.
    It works perfectly fine in linux.

    What could be the reason? Is there any specific setting required for it?

  2. #2
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    What command are you trying to run?
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  3. #3
    SitePoint Member
    Join Date
    Sep 2011
    Location
    Mumbai
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    anything,

    eg. print_r(shell_exec('ls -la'));

  4. #4
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    70 Post(s)
    Tagged
    0 Thread(s)
    well, ls -la isnt a valid windows command, for starters.
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  5. #5
    SitePoint Member
    Join Date
    Sep 2011
    Location
    Mumbai
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes it doesn't work in windows!


    print_r(shell_exec('dir'));
    it works
    Thanks!


Tags for this Thread

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
  •