php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2583 Can't pass value into .phtml page from UNIX command line execution of php .
Submitted: 1999-10-21 15:40 UTC Modified: 1999-10-27 16:45 UTC
From: jrivers at isearch dot com Assigned:
Status: Closed Package: Other
PHP Version: 3.0.12 OS: Solaris Unix
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
45 - 18 = ?
Subscribe to this entry?

 
 [1999-10-21 15:40 UTC] jrivers at isearch dot com
when I call the php processor with a command line of


     /xxx/xxx/php -q /xxx/xxx/gettest.phtml data=1

   where gettest.phtml consists of one line:
     printf("data=%s\n",$data);

    the php variable $data always stays set at blank. It will not take on the value of 1 from the command line. I have searched through absolutely every source available to me, and the issue is never discussed. The    php -help   command gives help information that provides no clue to the problem.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-10-27 16:45 UTC] sas at cvs dot php dot net
It does not work that way. If you use the command line version, you can access the parameters through the $argv array.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 10:01:32 2024 UTC