downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

$argv> <$http_response_header
[edit] Last updated: Fri, 24 Jun 2011

view this page in

$argc

$argcتعداد آرگومان‌های ارسال شده به اسکریپت

Description

شامل تعداد آرگومان‌های ارسابی به اسکریپت فعلی در حال اجرا از خط فرمان است.

Note: نام فایل اسکریپت بصورت آرگومان به اسکریپت ارسال می‌شود. بنابراین حداقل مقدار $argc 1 است.

Note: این متغیر تنها در صورتی موجود است که register_argc_argv فعال باشد.

Examples

Example #1 نمونه $argc

<?php
var_dump
($argc);
?>

هنگام اجرای نمونه با: php script.php arg1 arg2 arg3

The above example will output something similar to:

int(4)



$argv> <$http_response_header
[edit] Last updated: Fri, 24 Jun 2011
 
add a note add a note User Contributed Notes $argc - [3 notes]