note 74705 modified in ref.exec by adi

From: Date: Tue, 24 Apr 2007 12:13:54 +0000
Subject: note 74705 modified in ref.exec by adi
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-125830@lists.php.net to get a copy of this message
You must remember that if you're running your own compiled C programs and you don't get any output you probably do it like this: printf("some text"); shell_exec and similiar functions won't display it, you must do your output as follows: fprintf(stdout, "some text"); and then shell_exec and so will correctly read stdout (spent an hour wondering why my program isn't working when connected with PHP :) --was-- You must remember that if you're running your own compiled C programs and you don't get any output you probably do it like this: printf("some text"); shell_exec and similiar functions won't display it, you must do your output as follows: fprintf(stdout, "some text"); and then shell_exec and so will correctly read stdout (spent an hour wondering why my program isn't working when connected with PHP :) http://php.net/manual/en/ref.exec.php

« previous php.notes (#125830) next »