The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 passthru
Author: rev 
Date:   21-08-01 21:02

the PHP function passthru() outputs the raw result from ps aux and returns no value. so in the above code segment, printing that variable would serve no purpose.

Reply To This Message
 
 Re: passthru
Author: Dan Langille 
Date:   21-08-01 21:27

Right you are. Thanks.

For the record, here's the original script:

<title>FreeBSD Diary uptime via php3 passthru</title>
<body>

<?php
$uptime = passthru ("/usr/bin/uptime");
echo "<font face=\"Tahoma\" size=\"1\">$uptime</font></p>";
?>

</body>
</PRE>

The new script is:

html><title>FreeBSD Diary uptime via php3 passthru</title>
<body>

<font face="Tahoma" size="1"><?php
passthru ("/usr/bin/uptime");
?></font></p>

</body>

But I'm going to remove the font declaration anyways.

I'll amend the article accordingly.

Reply To This Message
 
 Re: passthru
Author: matthew 
Date:   04-05-02 17:31

i did notice, that this doesnt work if you have safe mode on, any ideas as to how to get it working if safe mode IS on?

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org