made a php program in windows server and here is my code: $cmdline = "filename" $result = shell_exec($cmdline); /directory -index.php -folder_containing_resource -filename the file uses a resource that is in the folder residing in the current directory( directory where php page is) now i need to upload my work in a linux server. what will be the right command in using shell_exec()? i know that what i used in my program is a windows executable file so i will provide a linux executable file for this. i just need to know the command in linux in order for my project to work. thanks in advance.
What you state above should work fine ; you can just run; $result = `./filename`; make sure the filename has perms 555 (or something like that)
You can use this too: $filename='/home/username/file_name_here'; // this is just an example of the file path; system($filename); PHP: