| 
 Posted by deko on 09/19/06 19:27 
I need to test a script and want to do so on a Linux box (logged in via SSH from  
another machine). 
 
I tried creating a test script (called "test.php") like this: 
 
#!/usr/bin/php 
<?php 
 print "test"; 
?> 
 
and tried running this from the command line like this: 
 
../test.php 
 
but nothing happens. 
 
I also tried this: 
 
../test > test.txt 
 
and the text in test.txt is this: 
 
X-Powered-By: PHP/4.2.2 
Content-type: text/html 
 
Why is "test" not appearing in the test.txt file? 
 
How do I get "test" to appear on my screen, rather than having to use test.txt? 
 
Do I have to redirect STDOUT?  How do I do this? 
 
Thanks in advance.
 
  
Navigation:
[Reply to this message] 
 |