Re: PHP with CLI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To use PHP with a command line simply put this at the top of your
script.  You need to tell it where to find php.

#!/usr/bin/php -q

Any output that would normally go to the browser should go to STDOUT.

This script worked for me.  Make sure you have the file as an
executable.  Below is the command to set the permissions to to read,
write and execute for only the OWNER of the file.

chmod 700 filename.php

This script worked for me. (don't include the equal signs)

=========================================================

#!/usr/bin/php -q
<? phpinfo(); ?>

=========================================================

Cheers,
Chris

On Mon, 2004-03-01 at 00:18, Steven Stern wrote:
> I have an application that requires the CLI module in PHP. The PHP that's
> installed with Fedora doesn't seem to have it.
> 
> 1) Is there a binary RPM available for PHP with CLI support? I couldn't find
> it on the mirrors.
> 
> 2) If not, and if I compile a new version of PHP, how does this affect my
> ability to use up2date to keep PHP current?
> --
>    Steve
>    
-- 
Software Engineering IV,
McMaster University
PGP Public Key: http://nesser.org/pgp-key/

08:44:09 up 46 min, 3 users, load average: 0.05, 0.23, 0.20 

Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux