> When running the php cgi executable from a bash command line (eg. ./php
> script.php3), how do I pass a var to the script? (eg. ./php
> script.php3?var=something)
./php script.php3 abc def
This will set $argv[1] to "abc" and $argv[2] to "def"
Now, if you want to pass it an argument similar to the CGI ?var=something
then you need to set this in the QUERY_STRING environment variable.
So, for a Bourne-shell based call:
QUERY_STRING="var=something" ./php script.php3
A quick way set data from a form to a function or other places where you can lose scope. Categories : PHP , HTML and PHP , Variables The following snippet gives complete info about all submitted
HTTP_POST_VARS and HTTP_GET_VARS Categories : Variables , HTTP , PHP Passing variables by reference. Categories : Variables , PHP Display variables when a form is submitted using POST/GET Categories : PHP , Functions , Variables , Debugging A class to put get and post variables in hidden form
elements. Works on scalars, normal arrays, associative
arrays. Categories : Algorithms , Variables , Arrays , PHP , PHP Classes How to pass an array to a function, or how to define a
function wich recieves an array. Categories : Variables , PHP , Arrays Check parameters validity. Paranoia was designed to check the validity of the parameters that a php page will receive after a form submission. It can be used to check the variables sent by POST or GET Categories : Algorithms , HTML and PHP , PHP , Variables Query2Report : Generating Html, Pdf and Csv Reports from SQL Query Categories : PHP , PHP , HTML , PDF , Excel PHP Dump in html format the contents of one array variable with a recursive list of the nested array variables inside. Categories : PHP , Arrays , Variables Initialize global variables for every field in a table.
This version requires that phplib is installed on your
server. Categories : Global Variables , MySQL , PHP , Variables Functions to read a template file and fill in PHP variables. It will also fill in array variables, displaying parts of the template multiple times.
Categories : PHP , Variables , Filesystem How to display a PHP variable value from a selectbox without reloading the
page by merging PHP and Javascript variables. Categories : PHP , Java Script , Variables Dump the contents of a PHP variable in html format with a recursive list of subfolders and files from a given root directory.
Categories : PHP , Directories , Variables , Arrays A database abstraction layer for the PHP Oracle 8 module (available from PHP 3.0.5). It supports persistent connections, fetching rows into arrays, prepare/execute (variable binding) and has a new and improved error interface. Categories : Databases , Oracle , PHP , Arrays , Variables Working with files - return an array of files within a directory Categories : PHP , Strings , Variables , Filesystem