{"id":159,"date":"2015-09-13T16:20:14","date_gmt":"2015-09-13T08:20:14","guid":{"rendered":"http:\/\/yyshell.com\/?p=159"},"modified":"2018-02-24T22:15:17","modified_gmt":"2018-02-24T14:15:17","slug":"windows-7%e4%b8%8b%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%aephpapachemysql%e7%8e%af%e5%a2%83%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/yyshell.com\/?p=159","title":{"rendered":"Windows 7\u4e0b\u5b89\u88c5\u914d\u7f6ePHP7+Apache2.4+MySQL5.7"},"content":{"rendered":"<p>\u76ee\u524d\uff0cphp\u7684\u6700\u65b0\u7248\u672c\u662f7.0.10\uff0cApache\u7684\u6700\u65b0\u7248\u672c\u662f2.4.23\uff0cMySQL\u7684\u6700\u65b0\u7248\u672c\u662f5.7.14\uff0c\u597d\u4e45\u6ca1\u5728Windows\u73af\u5883\u4e0b\u642d\u5efaAMP\u73af\u5883\u4e86\uff0c\u8fd9\u6b21\u51c6\u5907\u7528\u975e\u7ebf\u7a0b\u5b89\u5168\u7684Apache+fcgid\u6765\u5b8c\u6210\u642d\u5efa\uff0cWindows\u6211\u4eec\u9009\u62e9Windows 7 \uff0c\u5176\u4ed6\u5728Windows 8.1\u548cWindows 10\u4e0b\uff0c\u642d\u5efa\u65b9\u6cd5\u5e94\u8be5\u662f\u5b8c\u5168\u76f8\u540c\u7684\uff08\u4f46\u662f\u4e0d\u652f\u6301Windows XP\uff09\uff1b\u6240\u6709\u8f6f\u4ef6\u5747\u4e3a64\u4f4d\u8f6f\u4ef6\u3002<\/p>\n<p>\u5728Windows 7\u4e0b\u8fdb\u884cPHP\u73af\u5883\u642d\u5efa\uff0c\u9996\u5148\u9700\u8981\u4e0b\u8f7dPHP\u4ee3\u7801\u5305\u548cApache\u4e0eMysql\u7684\u5b89\u88c5\u8f6f\u4ef6\u5305\u3002<\/p>\n<p>PHP\u7248\u672c\uff1a\u6211\u4eec\u9009\u62e9\u53bb\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\uff0c\u4e0b\u8f7d\u9875\u9762<a href=\"http:\/\/windows.php.net\/download\/\">http:\/\/windows.php.net\/download\/<\/a>\uff0c\u4f60\u4e5f\u53ef\u4ee5\u76f4\u63a5\u70b9\u51fb<a href=\"http:\/\/windows.php.net\/downloads\/releases\/php-7.0.10-nts-Win32-VC14-x64.zip\">\u8fd9\u91cc<\/a>\u4e0b\u8f7d7.0.10\u7684\u7248\u672c\u3002<\/p>\n<p>Apache2.4\u7248\u672c\u73b0\u5728\u5b98\u65b9\u5df2\u7ecf\u4e0d\u63d0\u4f9b\u73b0\u6210\u7684\u4e8c\u8fdb\u5236\u5b89\u88c5\u7a0b\u5e8f\u4e86\uff0c\u73b0\u5728\u5b98\u65b9\u63a8\u8350\u4e3b\u8981\u662f\u53bb<a href=\"http:\/\/www.apachelounge.com\">apachelounge<\/a>\u53bb\u4e0b\u8f7d\uff0c\u76ee\u524d\u7684\u6700\u65b0\u7248\u672c2.4.23\u8bf7\u76f4\u63a5<a href=\"http:\/\/www.apachelounge.com\/download\/VC14\/binaries\/httpd-2.4.23-win64-VC14.zip\">\u4e0b\u8f7d<\/a>\u3002<\/p>\n<p>Apache\u4f7f\u7528\u7684fcgid\u6a21\u5757\u4e0b\u8f7d\u5730\u5740\u4e5f\u5728apachelounge\uff0c\u76ee\u524d\u6700\u65b0\u7248\u672c\u662f2.3.9\uff0c\u70b9\u51fb\u76f4\u63a5<a href=\"http:\/\/www.apachelounge.com\/download\/VC14\/modules\/mod_fcgid-2.3.9-win64-VC14.zip\">\u4e0b\u8f7d<\/a>\u3002<\/p>\n<p>PHP7\u548cApache\u8fd0\u884c\u9700\u8981\u5fae\u8f6fVC14\u8fd0\u884c\u5e93\uff0c\u4e0b\u8f7d\u5730\u5740\u5728<a href=\"https:\/\/www.microsoft.com\/zh-CN\/download\/details.aspx?id=53587\">\u5fae\u8f6f<\/a>,\u9009\u62e964\u4f4d\u7684\u7248\u672c\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<p>Mysql\u7248\u672c\u8bf7\u53bb\u5b98\u65b9<a href=\"http:\/\/dev.mysql.com\/downloads\/mysql\/\">\u4e0b\u8f7d<\/a>\uff0c\u76ee\u524d\u7684\u6700\u65b0\u7248\u672c5.7.14\uff0c\u6211\u4eec\u76f4\u63a5\u9009\u62e9\u7eff\u8272\u538b\u7f29\u5305\u201c<a href=\"http:\/\/dev.mysql.com\/get\/Downloads\/MySQL-5.7\/mysql-5.7.14-winx64.zip\">mysql-5.7.14-winx64.zip<\/a>\u201d\u4e0b\u8f7d\u3002<\/p>\n<p>\u672c\u673a\u7684IP\u662f192.168.42.81<\/p>\n<p><!--more--><\/p>\n<p>PHP\u73af\u5883\u642d\u5efa\u7b2c\u4e00\u6b65\uff1a\u5b89\u88c5VC14\u8fd0\u884c\u73af\u5883\uff0c\u8fd9\u4e2a\u8fd9\u91cc\u5c31\u4e0d\u591a\u8bf4\u4e86\u3002<\/p>\n<p>php\u73af\u5883\u642d\u5efa\u7b2c\u4e8c\u6b65\uff1a\u89e3\u538bhttpd-2.4.23-win64-VC14.zip\uff0c\u628a\u5176\u4e2d\u7684Apache24\u6587\u4ef6\u5939\u653e\u5230C\u76d8\u7684\u6839\u76ee\u5f55\u3002<\/p>\n<p>php\u73af\u5883\u642d\u5efa\u7b2c\u4e09\u6b65\uff1a\u89e3\u538bmod_fcgid-2.3.9-win64-VC14.zip\uff0c\u628a\u5176\u4e2d\u7684mod_fcgid.so\u6587\u4ef6\u653e\u5230c:\\Apache24\\modules\\\u6587\u4ef6\u5939\u4e0b\u9762\u3002<\/p>\n<p><strong>PHP\u73af\u5883\u642d\u5efa\u7b2c\u56db\u6b65\uff1aWindows 7\u4e0b\u5b89\u88c5Apache\u670d\u52a1\u3002<\/strong><\/p>\n<p>\u628aApache\u52a0\u5165\u670d\u52a1\u8bb0\u5f97\u5f97\u4ee5\u7ba1\u7406\u5458\u6743\u9650\u8fd0\u884ccmd\u3002<\/p>\n<p>\u5148cd c:\\Apache24\\bin\\\uff0c\u518dhttpd -k install\u5b89\u88c5\u670d\u52a1\uff0c\u5982\u4e0b\u56fe\uff1a<\/p>\n<p><strong><a href=\"https:\/\/yyshell.com\/wp-content\/uploads\/2015\/09\/amp1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-305 size-full\" src=\"https:\/\/yyshell.com\/wp-content\/uploads\/2015\/09\/amp1.png\" alt=\"amp1\" width=\"690\" height=\"232\" \/><\/a><\/strong>\u62a5\u9519\u6ca1\u5173\u7cfb\uff0c\u8fd9\u91cc\u7684\u62a5\u9519\u4e3b\u8981\u662f\u56e0\u4e3a\u6211\u4eec\u6ca1\u6709\u6307\u5b9aservername\u5bfc\u81f4\u7684\uff0c\u5f85\u4f1a\u914d\u7f6e\u7684\u65f6\u5019\u914d\u7f6e\u4e0b\u5c31\u884c\u4e86\u3002<\/p>\n<p>\u914d\u7f6e\u6587\u4ef6\u5982\u4e0b\uff1a<\/p>\n<pre class=\"lang:apache decode:true\">ServerRoot \"c:\/Apache24\"\r\nListen 80\r\n\r\nLoadModule access_compat_module modules\/mod_access_compat.so\r\nLoadModule actions_module modules\/mod_actions.so\r\nLoadModule alias_module modules\/mod_alias.so\r\nLoadModule allowmethods_module modules\/mod_allowmethods.so\r\nLoadModule asis_module modules\/mod_asis.so\r\nLoadModule auth_basic_module modules\/mod_auth_basic.so\r\nLoadModule authn_core_module modules\/mod_authn_core.so\r\nLoadModule authn_file_module modules\/mod_authn_file.so\r\nLoadModule authz_core_module modules\/mod_authz_core.so\r\nLoadModule authz_groupfile_module modules\/mod_authz_groupfile.so\r\nLoadModule authz_host_module modules\/mod_authz_host.so\r\nLoadModule authz_user_module modules\/mod_authz_user.so\r\nLoadModule autoindex_module modules\/mod_autoindex.so\r\nLoadModule cgi_module modules\/mod_cgi.so\r\nLoadModule dir_module modules\/mod_dir.so\r\nLoadModule env_module modules\/mod_env.so\r\nLoadModule include_module modules\/mod_include.so\r\nLoadModule isapi_module modules\/mod_isapi.so\r\nLoadModule log_config_module modules\/mod_log_config.so\r\nLoadModule mime_module modules\/mod_mime.so\r\nLoadModule negotiation_module modules\/mod_negotiation.so\r\nLoadModule rewrite_module modules\/mod_rewrite.so\r\nLoadModule setenvif_module modules\/mod_setenvif.so\r\nLoadModule fcgid_module modules\/mod_fcgid.so\r\n\r\n&lt;IfModule unixd_module&gt;\r\nUser daemon\r\nGroup daemon\r\n&lt;\/IfModule&gt;\r\n\r\nServerAdmin xxy@yyshell.com\r\nServerName 192.168.42.81:80\r\n\r\n&lt;Directory \/&gt;\r\n    AllowOverride none\r\n    Require all denied\r\n&lt;\/Directory&gt;\r\n\r\nDocumentRoot \"c:\/Apache24\/htdocs\"\r\n&lt;Directory \"c:\/Apache24\/htdocs\"&gt;\r\n    Options Indexes FollowSymLinks Includes ExecCGI\r\n    AllowOverride None\r\n    Require all granted\r\n&lt;\/Directory&gt;\r\n\r\n&lt;IfModule dir_module&gt;\r\n    DirectoryIndex index.php index.html\r\n&lt;\/IfModule&gt;\r\n\r\n&lt;Files \".ht*\"&gt;\r\n    Require all denied\r\n&lt;\/Files&gt;\r\n\r\nErrorLog \"logs\/error.log\"\r\nLogLevel warn\r\n\r\n&lt;IfModule log_config_module&gt;\r\n    LogFormat \"%h %l %u %t \\\"%r\\\" %&gt;s %b \\\"%{Referer}i\\\" \\\"%{User-Agent}i\\\"\" combined\r\n    LogFormat \"%h %l %u %t \\\"%r\\\" %&gt;s %b\" common\r\n    &lt;IfModule logio_module&gt;\r\n      LogFormat \"%h %l %u %t \\\"%r\\\" %&gt;s %b \\\"%{Referer}i\\\" \\\"%{User-Agent}i\\\" %I %O\" combinedio\r\n    &lt;\/IfModule&gt;\r\n    CustomLog \"logs\/access.log\" common\r\n&lt;\/IfModule&gt;\r\n\r\n&lt;IfModule alias_module&gt;\r\n    ScriptAlias \/cgi-bin\/ \"c:\/Apache24\/cgi-bin\/\"\r\n&lt;\/IfModule&gt;\r\n\r\n&lt;IfModule cgid_module&gt;\r\n&lt;\/IfModule&gt;\r\n\r\n&lt;Directory \"c:\/Apache24\/cgi-bin\"&gt;\r\n    AllowOverride None\r\n    Options None\r\n    Require all granted\r\n&lt;\/Directory&gt;\r\n\r\n&lt;IfModule mime_module&gt;\r\n    TypesConfig conf\/mime.types\r\n    AddType application\/x-compress .Z\r\n    AddType application\/x-gzip .gz .tgz\r\n&lt;\/IfModule&gt;\r\n\r\n&lt;IfModule proxy_html_module&gt;\r\nInclude conf\/extra\/proxy-html.conf\r\n&lt;\/IfModule&gt;\r\n\r\n&lt;IfModule ssl_module&gt;\r\nSSLRandomSeed startup builtin\r\nSSLRandomSeed connect builtin\r\n&lt;\/IfModule&gt;\r\n\r\nFcgidInitialEnv PATH \"c:\/php;C:\/WINDOWS\/system32;C:\/WINDOWS;C:\/WINDOWS\/System32\/Wbem;\"\r\nFcgidInitialEnv SystemRoot \"C:\/Windows\"\r\nFcgidInitialEnv SystemDrive \"C:\"\r\nFcgidInitialEnv TEMP \"C:\/WINDOWS\/Temp\"\r\nFcgidInitialEnv TMP \"C:\/WINDOWS\/Temp\"\r\nFcgidInitialEnv windir \"C:\/WINDOWS\"\r\nFcgidIOTimeout 64\r\nFcgidConnectTimeout 16\r\nFcgidMaxRequestsPerProcess 1000 \r\nFcgidMaxProcesses 50 \r\nFcgidMaxRequestLen 8131072\r\n\r\nFcgidInitialEnv PHPRC \"c:\/php\"\r\nFcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1000\r\n\r\n&lt;FilesMatch \"\\.php$\"&gt;\r\n  SetHandler fcgid-script\r\n  FcgidWrapper \"c:\/php\/php-cgi.exe\"\r\n&lt;\/FilesMatch&gt;<\/pre>\n<p>\u5728\u8fd9\u91cc\u4e3b\u8981\u914d\u7f6eNetwork Domain\u3001Server Name\u3001Email\u5730\u5740\u4ee5\u53caApache\u670d\u52a1\u7684\u5360\u7528\u7aef\u53e3\uff0c\u9ed8\u8ba4\u4e3a80\u7aef\u53e3\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u9700\u8981\u914d\u7f6e\u5728\u5176\u4ed6\u7aef\u53e3\uff0cApache\u7684\u5b89\u88c5\u76ee\u5f55\u4f60\u53ef\u4ee5\u4f7f\u7528\u9ed8\u8ba4\u76ee\u5f55\u6216\u6839\u636e\u9700\u8981\u81ea\u884c\u9009\u62e9\u5b89\u88c5\u76ee\u5f55\u3002<\/p>\n<p><strong>PHP\u73af\u5883\u642d\u5efa\u7b2c\u4e94\u6b65\uff1aWindows 7\u4e0b\u5b89\u88c5Mysql\u670d\u52a1\u3002<\/strong><\/p>\n<p>\u89e3\u538bmysql-5.7.14-winx64.zip\u91cc\u9762\u7684\u6587\u4ef6\u5939\u5230C\u76d8\u6839\u76ee\u5f55\uff0c\u628a\u89e3\u538b\u540e\u7684\u6587\u4ef6\u5939\u91cd\u547d\u540d\u4e3aMySQL\uff0c\u8fd9\u6837\uff0cmysql\u7684\u8def\u5f84\u4e3ac:\\MySQL<\/p>\n<p>\u5728c:\\MySQL\u4e0b\u5efa\u7acb\u6587\u672c\u6587\u4ef6my.ini\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<pre class=\"lang:mysql decode:true \">[client]\r\nno-beep\r\nport=3306\r\n\r\n[mysql]\r\ndefault-character-set=utf8\r\n\r\n[mysqld]\r\nport=3306\r\ndatadir=C:\/MySQL\/Data\r\ncharacter-set-server=utf8\r\ndefault-storage-engine=INNODB\r\nsql-mode=\"STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION\"\r\n\r\nlog-output=FILE\r\ngeneral-log=0\r\ngeneral_log_file=\"ADAGENE-BIO-20.log\"\r\nslow-query-log=1\r\nslow_query_log_file=\"ADAGENE-BIO-20-slow.log\"\r\nlong_query_time=10\r\nlog-error=\"ADAGENE-BIO-20.err\"\r\nserver-id=1\r\nsecure-file-priv=\"C:\/MySQL\/Uploads\"\r\n\r\nmax_connections=151\r\nquery_cache_size=0\r\ntable_open_cache=2000\r\ntmp_table_size=277M\r\nthread_cache_size=10\r\nmyisam_max_sort_file_size=100G\r\nmyisam_sort_buffer_size=541M\r\nkey_buffer_size=8M\r\nread_buffer_size=64K\r\nread_rnd_buffer_size=256K\r\n\r\ninnodb_flush_log_at_trx_commit=1\r\ninnodb_log_buffer_size=1M\r\ninnodb_buffer_pool_size=8M\r\ninnodb_log_file_size=48M\r\ninnodb_thread_concurrency=9\r\ninnodb_autoextend_increment=64\r\ninnodb_buffer_pool_instances=8\r\ninnodb_concurrency_tickets=5000\r\ninnodb_old_blocks_time=1000\r\ninnodb_open_files=300\r\ninnodb_stats_on_metadata=0\r\ninnodb_file_per_table=1\r\ninnodb_checksum_algorithm=0\r\n\r\nback_log=80\r\nflush_time=0\r\njoin_buffer_size=256K\r\nmax_allowed_packet=4M\r\nmax_connect_errors=100\r\nopen_files_limit=4161\r\nquery_cache_type=0\r\nsort_buffer_size=256K\r\ntable_definition_cache=1400\r\nbinlog_row_event_max_size=8K\r\nsync_master_info=10000\r\nsync_relay_log=10000\r\nsync_relay_log_info=10000<\/pre>\n<p>\u5982\u4f55\u628a\u7eff\u8272\u7248MySQL\u52a0\u5165\u670d\u52a1\uff0c\u8bf7\u8bbf\u95ee\u672c\u7ad9\u7684<a href=\"https:\/\/yyshell.com\/?p=183\">\u8fd9\u7bc7\u6587\u7ae0<\/a>\u3002<\/p>\n<p>\u6253\u5f00cmd\uff08\u7ba1\u7406\u5458\u6743\u9650\uff09\u521d\u59cb\u5316\u6570\u636e\u5e93\uff1a<\/p>\n<pre class=\"lang:sh decode:true \">cd \/d c:\\MySQL\\bin\r\nmysqld --initialize-insecure\r\nsc start MySQL\r\nmysqladmin -u root password NEWPASSWD<\/pre>\n<p>\u5c1d\u8bd5\u767b\u5f55\u4e0b\uff0c\u7528\u521a\u624d\u7684\u5bc6\u7801<br \/>\n<a href=\"https:\/\/yyshell.com\/wp-content\/uploads\/2015\/09\/amp2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-306 size-full\" src=\"https:\/\/yyshell.com\/wp-content\/uploads\/2015\/09\/amp2.png\" alt=\"amp2\" width=\"629\" height=\"219\" \/><\/a>\u6210\u529f\uff01<\/p>\n<p>\u767b\u5f55\u540e\u521b\u5efa\u6570\u636e\u5e93\uff0c\u521b\u5efa\u53ef\u4ee5\u8bbf\u95ee\u6570\u636e\u5e93\u7684\u7528\u6237\u548c\u5bc6\u7801\uff0c\u8fd9\u5bf9\u4e8ewordpress\u8fd9\u6837\u7684\u5e94\u7528\uff0c\u5efa\u8bae\u8bbe\u5b9a\u4e13\u95e8\u7684\u6570\u636e\u5e93\u548c\u4e13\u95e8\u7684\u7528\u6237\u3002<\/p>\n<pre class=\"lang:sh decode:true \">create database wordpress;\r\ngrant all privileges on wordpress.* to wordpress@localhost identified by 'YOURPASSWD';<\/pre>\n<p>PHP\u73af\u5883\u642d\u5efa\u7b2c\u516d\u6b65\uff1a\u5b89\u88c5php<\/p>\n<p>\u89e3\u538bphp-7.0.10-nts-Win32-VC14-x64.zip\u91cc\u9762\u7684\u6587\u4ef6\u5230c:\\php\u4e2d\uff0c\u6ca1\u6709c:\\php\u5c31\u65b0\u5efa\u8fd9\u4e2a\u6587\u4ef6\u5939\u3002<\/p>\n<p>\u590d\u5236\u6587\u4ef6\u5939\u4e0b\u7684php.ini-production\u6587\u4ef6\uff0c\u91cd\u547d\u540d\u4e3aphp.ini\u3002<\/p>\n<p>\u7f16\u8f91php.ini\u6587\u4ef6\uff0cphp\u7684\u914d\u7f6e\u603b\u4f53\u975e\u5e38\u591a\uff0c\u4e0b\u9762\u51e0\u9879\u662f\u9700\u8981\u7f16\u8f91\u4fee\u6539\u7684\u3002<\/p>\n<pre class=\"lang:ini decode:true \">[PHP]\r\nextension_dir = \"ext\"\r\ncgi.force_redirect = 0\r\ncgi.fix_pathinfo=1\r\nfastcgi.impersonate = 1\r\nfastcgi.logging = 0\r\n[Date]\r\ndate.timezone = Asia\/Shanghai\r\n[opcache]\r\nopcache.huge_code_pages=1<\/pre>\n<p>\u7528ApacheMonitor.exe\u542f\u52a8Apache<br \/>\n<a href=\"https:\/\/yyshell.com\/wp-content\/uploads\/2015\/09\/amp3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-307 size-full\" src=\"https:\/\/yyshell.com\/wp-content\/uploads\/2015\/09\/amp3.png\" alt=\"amp3\" width=\"541\" height=\"350\" \/><\/a><\/p>\n<p>\u4e00\u4e9b\u989d\u5916\u7684\u914d\u7f6e\uff0c\u6211\u4eec\u4e5f\u53ef\u4ee5\u914d\u7f6e\u4e0b\uff08\u5982\u679c\u6709\u5fc5\u8981\u7684\u8bdd\uff09<\/p>\n<p>1\u3001\u914d\u7f6ePHP\u7684Session\u529f\u80fd\uff1a<\/p>\n<p>\u5728\u4f7f\u7528session\u529f\u80fd\u65f6\uff0c\u6211\u4eec\u5fc5\u987b\u914d\u7f6esession\u6587\u4ef6\u5728\u670d\u52a1\u5668\u4e0a\u7684\u4fdd\u5b58\u76ee\u5f55\uff0c\u5426\u5219\u65e0\u6cd5\u4f7f\u7528session\uff0c\u6211\u4eec\u9700\u8981\u5728Windows 7\u4e0a\u65b0\u5efa\u4e00\u4e2a\u53ef\u8bfb\u5199\u7684\u76ee\u5f55\u6587\u4ef6\u5939\uff0c\u6b64\u76ee\u5f55\u6700\u597d\u72ec\u7acb\u4e8eWEB\u4e3b\u7a0b\u5e8f\u76ee\u5f55\u4e4b\u5916\uff0c\u6b64\u5904\u6211\u5728D\u76d8\u6839\u76ee\u5f55\u4e0a\u5efa\u7acb\u4e86phpsessiontmp\u76ee\u5f55\uff0c\u7136\u540e\u5728 php.ini\u914d\u7f6e\u6587\u4ef6\u4e2d\u627e\u5230<\/p>\n<p>;session.save_path = &#8220;\/tmp&#8221;<\/p>\n<p>\u4fee\u6539\u4e3a<\/p>\n<p>session.save_path = &#8220;D:\/phpsessiontmp&#8221;<\/p>\n<p>2\u3001\u914d\u7f6ePHP\u7684\u6587\u4ef6\u4e0a\u4f20\u529f\u80fd\uff1a<\/p>\n<p>\u540csession\u4e00\u6837\uff0c\u5728\u4f7f\u7528PHP\u6587\u4ef6\u4e0a\u4f20\u529f\u80fd\u65f6\uff0c\u6211\u4eec\u5fc5\u987b\u8981\u6307\u5b9a\u4e00\u4e2a\u4e34\u65f6\u6587\u4ef6\u5939\u4ee5\u5b8c\u6210\u6587\u4ef6\u4e0a\u4f20\u529f\u80fd\uff0c\u5426\u5219\u6587\u4ef6\u4e0a\u4f20\u529f\u80fd\u4f1a\u5931\u8d25\uff0c\u6211\u4eec\u4ecd\u7136\u9700\u8981 \u5728Windows 7\u4e0a\u5efa\u7acb\u4e00\u4e2a\u53ef\u8bfb\u5199\u7684\u76ee\u5f55\u6587\u4ef6\u5939\uff0c\u6b64\u5904\u6211\u5728D\u76d8\u6839\u76ee\u5f55\u4e0a\u5efa\u7acb\u4e86phpfileuploadtmp\u76ee\u5f55\uff0c\u7136\u540e\u5728php.ini\u914d\u7f6e\u6587\u4ef6\u4e2d\u627e\u5230<\/p>\n<p>;upload_tmp_dir =<\/p>\n<p>\u4fee\u6539\u4e3a<\/p>\n<p>upload_tmp_dir = &#8220;D:\/phpfileuploadtmp&#8221;<\/p>\n<p>\u81f3\u6b64\u5728Windows 7\u4e0aphp\u7684\u73af\u5883\u914d\u7f6e\u5c31\u7b97\u5b8c\u6210\u4e86\uff0c\u4f60\u53ea\u9700\u8981\u5728c:\\Apache24\\htdocs\\\u76ee\u5f55\u4e0b\u65b0\u5efa\u4e00\u4e2aPHP\u6587\u4ef6index.php\uff0c\u5199\u5165<\/p>\n<pre class=\"lang:php decode:true \">&lt;?php\r\nphpinfo();\r\nphpinfo(INFO_MODULES);\r\n?&gt;<\/pre>\n<p>\u7136\u540e\u5728\u6e38\u89c8\u5668\u4e2d\u8f93\u5165http:\/\/localhost\/\uff0c\u5c31\u53ef\u4ee5\u770b\u5230PHP\u7684\u5177\u4f53\u914d\u7f6e\u9875\u9762\u4e86\uff0c\u4ee3\u8868\u5728Window 7\u4e0aPHP\u73af\u5883\u914d\u7f6e\u5de5\u4f5c\u5c31\u7b97\u5b8c\u6210\u4e86\u3002<\/p>\n<p><a href=\"https:\/\/yyshell.com\/wp-content\/uploads\/2015\/09\/amp4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-308 size-full\" src=\"https:\/\/yyshell.com\/wp-content\/uploads\/2015\/09\/amp4.png\" alt=\"amp4\" width=\"933\" height=\"766\" \/><\/a>\u63a5\u4e0b\u6765\u6211\u4eec\u53ef\u4ee5\u5b89\u88c5\u8bf8\u5982wordpress\u6216\u8005phpbb\u7b49\u76f8\u5e94\u7684\u5e94\u7528\u4e86\uff0c\u8fd9\u91cc\u5c31\u4e0d\u5728\u8d58\u8ff0\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u524d\uff0cphp\u7684\u6700\u65b0\u7248\u672c\u662f7.0.10\uff0cApache\u7684\u6700\u65b0\u7248\u672c\u662f2.4.23\uff0cMy<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,3],"tags":[28,29,27,30],"class_list":["post-159","post","type-post","status-publish","format-standard","hentry","category-web","category-windows","tag-apache","tag-mysql","tag-php","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/yyshell.com\/index.php?rest_route=\/wp\/v2\/posts\/159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yyshell.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yyshell.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yyshell.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yyshell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=159"}],"version-history":[{"count":7,"href":"https:\/\/yyshell.com\/index.php?rest_route=\/wp\/v2\/posts\/159\/revisions"}],"predecessor-version":[{"id":467,"href":"https:\/\/yyshell.com\/index.php?rest_route=\/wp\/v2\/posts\/159\/revisions\/467"}],"wp:attachment":[{"href":"https:\/\/yyshell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yyshell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yyshell.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}