💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# redis/memche/xdebug ## 配置redis - - 查看phpinfo() ``` <pre class="calibre14">``` Compiler MSVC11 <span class="token2">(</span>Visual C<span class="token">++</span> <span class="token3">2012</span><span class="token2">)</span> Architecture x86 PHP Extension Build API20131226<span class="token2">,</span>NTS<span class="token2">,</span>VC11 ``` ``` - 查找 查找相对应得Redis扩展 下载地址:<http://pecl.php.net/package/redis> 我的是x86,vc11,php5.6 解压,并复制php\_redis.dll 和 php\_redis.pdb 粘贴到PHPstudy的PHP的ext 打开PHPstudy的 其他选项菜单 -> 打开配置文件 -> php.ini,加上 extension=php\_redis.dll - 客户端与服务端安装,可以不与php插件版本相同 <https://github.com/MicrosoftArchive/redis/tags> 注意下载windows zip压缩包不要msi版本 安装并进入 cd /d D:\\redis 运行 `redis-server redis.windows.conf` 不要关闭,另开一个cmd运行`redis-cli.exe -h 127.0.0.1 -p 6379` 执行 `set a hello``get a` flushall 清除全部缓存 keys \* 查看全部缓存key 有输出hello说明安装成功! ### 配置 memche ``` <pre class="calibre14">``` Compiler MSVC11 <span class="token2">(</span>Visual C<span class="token">++</span> <span class="token3">2012</span><span class="token2">)</span> Architecture x86 PHP Extension Build API20131226<span class="token2">,</span>NTS<span class="token2">,</span>VC11 ``` ``` php扩展安装,注意下载对应的vc 系统 php版本三者统一 <https://windows.php.net/downloads/pecl/releases/memcache/> 复制 php\_memcache.dll,php\_memcache.pdb到ext php.ini添加 extension=php\_memcache.dll windows的memche安装http://s3.amazonaws.com/downloads.northscale.com/memcached-win64-1.4.4-14.zip 放到目录下 cmd 进入memcached目录 ``` <pre class="calibre14">``` memcache的安装<span class="token2">:</span> memcached<span class="token2">.</span>exe <span class="token">-</span>d install memcache的卸载<span class="token2">:</span> memcached<span class="token2">.</span>exe <span class="token">-</span>d uninstall 启动memcache<span class="token2">:</span> memcached<span class="token2">.</span>exe <span class="token">-</span>d start ``` ``` 测试代码 ``` <pre class="calibre14">``` <span class="token"><</span><span class="token">?</span>php $mem <span class="token">=</span> <span class="token1">memcache_connect</span><span class="token2">(</span><span class="token4">'localhost'</span><span class="token2">,</span><span class="token3">11211</span><span class="token2">)</span><span class="token2">;</span> <span class="token1">var_dump</span><span class="token2">(</span>$mem<span class="token2">)</span><span class="token2">;</span> ``` ``` ## 配置phpstudy+xdebug+phpstorm 下载 <https://xdebug.org/download.php> 打开php.ini,找到xdebug代码,去掉分号,加上 ``` <pre class="calibre14">``` zend_extension<span class="token">=</span><span class="token4">"D:\phpstudy\PHPTutorial\php\php-5.6.27-nts\ext\php_xdebug.dll"</span> xdebug<span class="token2">.</span>remote_enable <span class="token">=</span> On xdebug<span class="token2">.</span>remote_handler <span class="token">=</span> dbgp xdebug<span class="token2">.</span>remote_host<span class="token">=</span> localhost xdebug<span class="token2">.</span>remote_port <span class="token">=</span> <span class="token3">9001</span> xdebug<span class="token2">.</span>idekey <span class="token">=</span> PHPSTORM ``` ``` 配置phpstorm 服务器,添加php web page配置,设置DBgp Proxy代理,PHPSTORM,localhost,9001