検索

さまざまなプラットフォーム上でプログラムの互換性を高めるために、多くの場合、現在の PHP 動作環境パラメータを取得する必要があります。たとえば、magic_quotes_gpc ステータスを取得して、フォームの送信時にデータをエスケープ (スラッシュを追加) するかどうかを決定します。set max_execution_time を使用して、プログラムの実行時間を延長します。set error_reporting を使用して、プロジェクトを開発段階と運用段階の間で切り替えます。 ; set メモリを増やすためにmemory_limitを設定します...

ini_set(string varname, string newvalue): 環境設定のパラメータを設定します

ini_get(string varname): 環境設定のパラメータを取得します

パラメータリストは以下の通りです

名前 デフォルト 変更可能 PHP_INI_ALL encode_jis「」PHP_INI_ALL " 128インチPHP_INI_SYSTEMfbsql.max_connections「128インチ」 PHP_INI_SYSTEM fbsql.max_results「128」PHP_INI_SYSTEMfbsql.batchSize「1000」 PHP_INI_SYSTEMfbsql.default_hostNULLPHP_INI_SYSTEM fbsql.default_user “_SYSTEM”PHP_INI_SYSTEMfbsql.default_password“” PHP_INI_SYSTEMfbsql .default_database“”PHP_INI_SYSTEMfbsql.default_database_passwordhwapi.allow_persistenthyperwave. PHP_INI_SYSTEMhyperwave.default_port“418”PHP_INI_ALLiconv.input_encodingICONV_INPUT_ENCODINGPHP_INI_ALLiconv.output_encodingICONV_OUTPUT_ENCODING PHP_INI_すべて PHP_INI_ALLPHP_INI_S YSTEMPHP_INI_SYSTEMPHP_INI_SYSTEMifx.default_hostNULLPHP_INI_SYSTEM ifx.default_userNULLPHP_INI_SYSTEMifx.default_passwordNULLPHP_INI_SYSTEMifx.blobinfile“1”PHP_INI_ALLifx.textasvarchar 「0″PHP_INI_ALLifx.byteasvarchar「0″PHP_INI_ALLifx. INI_ALLifx.nullformat“0” PHP_INI_ALLingres.allow_persistent“1”PHP_INI_SYSTEMingres.max_persistent”- 1”PHP_INI_SYSTEM ingres.max_links“-1”PHP_INI_SYSTEMingres.default_databaseNULL PHP_INI_ALLibase.default_userNULL PHP_INI_ALLibase.default_passwordNULLPHP_INI_ALLibase.timestampformat“%m/%d/%Y%H:%M:%S”PHP_INI_ALLibase.dateformat“%m/%d/%Y”PHP_INI_ALL ibase.timeformat“%H:%M:%S”PHP_INI_ALLjava.class.pathNULLPHP_INI_ALLjava.homejava.library.pathjava.libraryブラリーNULLPHP_INI_ALLldap.max_links” -1''PHP_INI_SYSTEMmbstring.detect_orderNULLPHP_INI_ALLmbstring.http_inputNULLPHP _ INI_ALLmbstring.http_outputNULLPHP_INI_ALL mbstring .internal_encodingNULLPHP_INI_ALLmbstring.substitute_characterNULLPHP_INI_ALLmbstring.func_overload「0」PHP_INI_SYSTEMmcrypt.algorithms_dirNULLPHP_INI_ALL mcrypt.modes_dirNULLPHP_INI_ALLmime_magic.magicfile「/usr/share/misc/magic.mime」“1”「-1」「-1」“25″「10」「10」“0″“5”“60” 「-1」PHP_INI_ALLmssql.textlimit 「- 1」 PHP_INI_ALLmssql.secure_connection「0」PHP_INI_SYSTEM mysql.allow_persistent「1」 PHP_INI_SYSTEMmysql.max_persistent“-1″ PHP_INI_SYS TEMmysql.max_links“-1″PHP_INI_SYSTEMmysql.default_hostNULLPHP_INI_ALLmysql.default_userNULLPHP_INI_ALL mysql.default_ パスワードNULLPHP_INI_ALLPHP_INI_ALLPHP_INI_ALL PHP_INI_ALLPHP_INI_ALL odbc.max_links“-1”PHP_INI_SYSTEModbc .default_dbNULLPHP_INI_ALLodbc.default_userNULLPHP_INI_ALLodbc.default_pwodbc.defaultlrlodbc.defaultbinmodeodbc.check_persistentpfpro。デフォルトホスト pfpro.defaulthostpfpro.defaultportpfpro .defaulttimeout pfpro.proxyaddresspfpro.proxyportpfpro.proxylogon “”PHP_INI_ALLpfpro.proxypassword”” PHP_INI_ALLpgsql.allow_persistent“1”PHP_INI_SYSTEM“-1” PHP _INI_SYSTEMpgsql.max_links“-1”PHP_INI_SYSTEM pgsql.auto_reset_persistent“0”PHP_INI_SYSTEMpgsql.ignore_notice“0”PHP_INI_ALLPHP_INI_ALLPHP_INI_ALLPHP_INI_ALLPHP_INI_ALLPHP_INI_ALL PHP_INI_ALLPHP_INI_ALL PHP_INI_ALLPHP_INI_ALL session.cookie_domain””PHP_INI_ALLPHP_INI_PERDIR sybct.max_linkssybct.min_server_severitysybct.min_client_severitysybct.hostnamevpopmail.directoryzlib.output_compression PHP_INI_PERDIRzlib.output_compression_leveldefine_syslog_variablesハイライト。バックグラウンドT_COLORHL_HTML_COLORHL_KEYWORD_COLORHL_StrING_COLOR「1」 PHP_INI_PERDIRasp_tags「0」PHP_INI_SYSTEM display_errorsdisplay_startup_errors「0」PHP_INI_ALL「1」「1」 ''「1」「0」“0” “0””0””0”“1024”「0」「0」「1」 PHP_INI_SYSTEMmagic_quotes_runtime“0″PHP_INI_ALLmagic_quotes_sybase“0”PHP_INI_ALL“0” PHP_INI_SYSTEMoutput_handlerNULLPHP_INI_PERDIRregister_argc_argvPHP_INI_SYSTEM “0”PHP_INI_SYSTEMsafe_mode_include_dir NULL PHP_INI_SYSTEMsql.safe_mode“0”PHP_INI_SYSTEMtrack_errors “0”PHP_INI_ALLy2k_compliance“0”PHP_INI_ALLunserialize_callback_funcNULL PHP_INI_ALLarg_separator.output“&”PHP_INI_ALL arg_separator.input“&”PHP_INI_SYSTEMauto_append_fileNULLPHP_INI_SYSTEMauto_prepend_fileNULLPHP_INI_SYSTEMdoc_rootNULL PHP_INI_SYSTEM default_charsetSAPI_DEFAULT_CHARSETPHP_INI_ALLdefault_mimetypeSAPI_DEFAULT_MIMETYPEerror_logextension_dir「GPC」PHP_INCLUDE_PAth「30 ''」 " 1″“2M” PHP_INI_PERDIRfile_uploads “1″“8M” PHP_INI_PERDIRNULLNULLNULLPHP_INI_ALLerror_append_stringNULLPHP_INI_ALLerror_prepend_stringNULL PHP_INI_ALLSMTP“localhost”PHP_INI_ALLsmtp_port25PHP_INI_ALLbrowscapNULLPHP_INI_SYSTEMerror_reportingNULLPHP_INI_ALLmemory_limit“8M”PHP_INI_ALL精度“14”PHP_INI_ALLsendmail_fromNULLPHP_INI_ALLsendmail_pathDEFAULT_SENDMAIL_PAthPHP_INI_SYSTEMdisable_classes””php.ini onlydisable_functions””php.ini onlyallow_url_fopen”1 ” PHP_INI_ALLalways_populate_raw_post_data“0″ PHP_INI_SYSTEM
com.allow_dcom “0″ PHP_INI_SYSTEM
com.autoregister_typelib ”0″ PHP_INI_ SYSTEM
com.autoregister_verbose “0” PHP_INI_SYSTEM
com.autoregister_casesensitive “1” PHP_INI_SYSTEM
com.typelib_file “” PHP_INI_SYSTEM
crack.default_dictionary NULL PHP_INI_SYSTEM
exif.encode_unicode 「ISO-8859-15」 「UCS-2LE」
exif。 decode_jis_motorola 「JIS」 PHP_INI_ALL
exif.decode_jis_intel “JIS” PHP_INI_ALL
fbsql.allow_persistent “1” PHP_INI_SYSTEM
fb sql.generate_warnings “0” PHP_INI_SYSTEM
fbsql.autocommit
“” PHP_INI_SYSTEM
“0″ PHP_INI_SYSTEM
iconv.internal_encoding ICONV_INTERNAL_ENCODING
ifx.allow_persistent ”1 ''
ifx.max_persistent 「-1」
ifx.
ingres.default_user NULL PHP_INI_ALL
ingres.default_password NULL PHP_INI_ALL
ibase.allow ent “1” PHP_INI_SYSTEM
ibase.max_persistent ” - 1″ PHP_INI_SYSTEM
ibase.max_links 「-1″ PHP_INI_SYSTEM
NULL PHP_INI_ALL
NULL PHP_INI_ALL
JAVALIB PHP_INI_ALL
PHP_INI_SYS TEM mssql.allow_persistent
PHP_INI_SYSTEM mssql.max_persistent
PHP_INI_SYSTEM mssql.max_links
PH P_INI_SYSTEM mssql.max_procs
PHP_INI_ALL mssql.min_error_severity
PHP_INI_ALL mssql.min_message_severity
PHP_INI_ALL mssql.compatability_mode
PHP_INI_ALL mssql .connect_timeout
PHP_INI_ALL mssql.timeout
PHP_INI_ALL mssql.textsize
mysql.default_port NULL
mysql.default_socket NULL
ncurses.value “42”
ncurses.string “foobar”
odbc.allow_persistent “1” PHP_INI_SYSTEM
odbc.max_persistent ”-1” PHP_INI_SYSTEM
NULL PHP_INI_ALL
“4096” PHP_INI_ALL
“1” PHP_INI_ALL
“1” PHP_INI_SYSTEM
「test.signio.com」
“test-payflow.verisign.com”
“443” PHP_INI_ALL
「30インチ」 PHP_INI_ALL
”” PHP_INI_ALL
”” PHP_INI_ALL
pgsql.max_persistent
pgsql.log_notice “0″
セッション.save_path “/tmp”
session.name “PHPSESSID”
session.save_handler 「ファイル」
session.auto_start “0”
session.gc_maxlifetime “1440”
session.serialize_handler “php”
session.cookie_lifetime “0”
session.cookie_path ”/”
session.cookie_secure “” PHP_INI_ALL
セッション。 use_cookies “1 ″ PHP_INI_ALL
session.use_only_cookies ”0 ″ PHP_INI_ALL
session.referer_check 「」 PHP_INI_ALL
session.entropy_file 「」 PHP _INI_ALL
session.entropy_length “0” PHP_INI_ALL
session.cache_limiter “nocache” PHP_INI_ALL
session.cache_expire “180” PHP_INI_ALL
session.use_trans_sid “0” PHP_INI_SYSTEM
session.encode_sources “globals,track” PHP_INI_ALL
assert.active “1” PHP_INI_ALL
assert.保釈 “0″ PHP_INI_ALL
assert.warning “1” PHP_INI_ALL
assert.callback NULL PHP_INI_ALL
assert.quiet_eval 「0」 PHP_INI_ALL
safe_mode_protected_env_vars SAFE_MODE_PROTECTED_ENV_VARS PHP_INI_SYSTEM
safe_mode_allowed_env_vars SAFE_MODE_ALLOWED_ENV_VARS PHP_INI_SYSTEM
url_rewriter.tags 「a=h」 ref,area=href,
frame=src,
form=fakeentry”
PHP_INI_ALL
sybct. allowed_persistent “1” PHP_INI_SYSTEM
sybct.max_persistent “-1”
「-1」 PHP_INI_SYSTEM
「10」 PHP_INI_ALL
「10」 PHP_INI_ALL
NULL PHP_INI_ALL
“” PHP_INI_ALL
“0” PHP_INI_SYSTEM
“-1” PHP_INI_ALL
「0」 PHP_INI_ALL
PHP_INI_ALL highlight.html
PHP_INI_ALL ハイライト.キーワード
PHP_INI_ALL ハイライト.string
PHP_INI_ALL allow_call_time_pass_reference
PHP_INI_SYSTEM
PHP_INI_PERDIR
「1」 PHP_INI_ALL

enable_dl
PHP_INI_SYSTEM expose_php
PHP_INI_SYSTEM html_errors
PHP_INI_ALL xmlrpc_errors
PHP_INI_SYS TEM xmlrpc_error_number
PHP_INI_ALL ignore_user_abort
PHP_INI_ALL implicit_flush
PHP_INI_ALL log_errors
PHP_INI_ALL log_errors_max_len
PHP_INI_ALL ignore_repeat_errors
PHP_INI_ALL ignore_repeat_source
PHP_INI_ALL magic_quotes_gpc
PHP_INI_PERDIR

output_buffering
PHP_INI_PERDIR
PHP_INI_SYSTEM
「1」 PHP_INI_PERDIR
register_globals 「0」 PHP_INI_PERDIR
PHP_INI_SYSTEM
safe_mode 「1」 PHP_システム
safe_mode_include_dir
PHP_INI_SYSTEM
safe_mode_gid “0” PHP_INI_SYSTEM
short_open_tag DEFAULT_SHORT_OPEN_TAG PHP_INI_PERDIR
PHP_INI_PERDIR
PHP_INI_PERDIR
PHP_INI_PERDIR
PHP _INI_ALL
NULL PHP_INI_ALL
PHP_EXTENSION_DIR PHP_INI_SYSTEM gpc_order
PHP_INI_ALL include_path
PHP_INI_ALL max_execution_time
PHP_INI_SYSTEM upload_max_filesize
PHP_INI_SYSTEM
PHP_INI_SYSTEM post_max_size
PHP_INI_SYSTEM
upload_tmp_dir
PHP_INI_SYSTEM user_dir
PHP_INI_SYSTEM variables_order
PHP_INI_PERDIR
xbithack “0” PHP_INI_ALL
エンジン “1” PHP_INI_ALL
last_modified “0” PHP_INI_ALL
child_terminate “0” PHP_INI_ALL
async_send “0″ PHP_INI_ALL

操作可能范围见下表:

操作范围

定数値 意味 エントリはphp.iniまたはhttpd 。 confPHP_INI_ALL7エントリはどこでも設定可能
PHP_INI_USER 1 入力可能ユーザースクリプトで設定できます
PHP_INI_PERDIR 2 エントリはphp.ini、.htaccessまたはhttpd.confで設定できます
PHP_INI_SYSTEM 4
声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
PHPセッションの概念を簡単に説明してください。PHPセッションの概念を簡単に説明してください。Apr 26, 2025 am 12:09 AM

phpssionsStrackuserdataacrossmultiplepagerequestsusingauniqueidstoredinacookie.here'showtomanageetheemefectively:1)Startassession withsession_start()andstoredatain $ _ session.2)RegeneratesseSsessidafterloginwithsession_id(the topreventes_id)

PHPセッションに保存されているすべての値をどのようにループしますか?PHPセッションに保存されているすべての値をどのようにループしますか?Apr 26, 2025 am 12:06 AM

PHPでは、次の手順を通じてセッションデータを繰り返すことができます。1。session_start()を使用してセッションを開始します。 2。$ _Sessionアレイのすべてのキー価値ペアを介してforeachループを反復します。 3.複雑なデータ構造を処理する場合、is_array()またはis_object()関数を使用し、print_r()を使用して詳細情報を出力します。 4.トラバーサルを最適化する場合、ページングを使用して、一度に大量のデータの処理を避けることができます。これにより、実際のプロジェクトでPHPセッションデータをより効率的に管理および使用するのに役立ちます。

ユーザー認証にセッションを使用する方法を説明します。ユーザー認証にセッションを使用する方法を説明します。Apr 26, 2025 am 12:04 AM

このセッションは、サーバー側の状態管理メカニズムを介してユーザー認証を実現します。 1)セッションの作成と一意のIDの生成、2)IDはCookieを介して渡されます。3)サーバーストアとIDを介してセッションデータにアクセスします。

PHPセッションにユーザーの名前を保存する方法の例を挙げてください。PHPセッションにユーザーの名前を保存する方法の例を挙げてください。Apr 26, 2025 am 12:03 AM

tostoreauser'snameInappession、starthessession withsession_start()、thensignthenameto $ _session ['username']。1)ousession_start()toinitializethessession.2)assighttheuser'snameto $ _ session ['username']

PHPセッションを失敗させる可能性のあるいくつかの一般的な問題は何ですか?PHPセッションを失敗させる可能性のあるいくつかの一般的な問題は何ですか?Apr 25, 2025 am 12:16 AM

PHPSESSIONの障害の理由には、構成エラー、Cookieの問題、セッションの有効期限が含まれます。 1。構成エラー:正しいセッションをチェックして設定します。save_path。 2.Cookieの問題:Cookieが正しく設定されていることを確認してください。 3.セッションの有効期限:セッションを調整してください。GC_MAXLIFETIME値はセッション時間を延長します。

PHPでセッション関連の問題をどのようにデバッグしますか?PHPでセッション関連の問題をどのようにデバッグしますか?Apr 25, 2025 am 12:12 AM

PHPでセッションの問題をデバッグする方法は次のとおりです。1。セッションが正しく開始されるかどうかを確認します。 2.セッションIDの配信を確認します。 3.セッションデータのストレージと読み取りを確認します。 4.サーバーの構成を確認します。セッションIDとデータを出力し、セッションファイルのコンテンツを表示するなど、セッション関連の問題を効果的に診断して解決できます。

session_start()が複数回呼び出されるとどうなりますか?session_start()が複数回呼び出されるとどうなりますか?Apr 25, 2025 am 12:06 AM

session_start()への複数の呼び出しにより、警告メッセージと可能なデータ上書きが行われます。 1)PHPは警告を発し、セッションが開始されたことを促します。 2)セッションデータの予期しない上書きを引き起こす可能性があります。 3)session_status()を使用してセッションステータスを確認して、繰り返しの呼び出しを避けます。

PHPでセッションのライフタイムをどのように構成しますか?PHPでセッションのライフタイムをどのように構成しますか?Apr 25, 2025 am 12:05 AM

PHPでのセッションライフサイクルの構成は、session.gc_maxlifetimeとsession.cookie_lifetimeを設定することで達成できます。 1)session.gc_maxlifetimeサーバー側のセッションデータのサバイバル時間を制御します。 0に設定すると、ブラウザが閉じているとCookieが期限切れになります。

See all articles

ホットAIツール

Undresser.AI Undress

Undresser.AI Undress

リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover

AI Clothes Remover

写真から衣服を削除するオンライン AI ツール。

Undress AI Tool

Undress AI Tool

脱衣画像を無料で

Clothoff.io

Clothoff.io

AI衣類リムーバー

Video Face Swap

Video Face Swap

完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

ホットツール

SublimeText3 英語版

SublimeText3 英語版

推奨: Win バージョン、コードプロンプトをサポート!

VSCode Windows 64 ビットのダウンロード

VSCode Windows 64 ビットのダウンロード

Microsoft によって発売された無料で強力な IDE エディター

PhpStorm Mac バージョン

PhpStorm Mac バージョン

最新(2018.2.1)のプロフェッショナル向けPHP統合開発ツール

WebStorm Mac版

WebStorm Mac版

便利なJavaScript開発ツール

ドリームウィーバー CS6

ドリームウィーバー CS6

ビジュアル Web 開発ツール