• Windows下Phalcon的安装以及phpstorm识别phalcon语法及提示


    1.由于Phalcon是C语言写的一个扩展,所以需要安装这个扩展php_phalcon.dll,下载地址https://github.com/phalcon/cphalcon/releases, 

    然后将这个扩展文件放在相对应的文件中,我这边存放的位置是C:phplaragoninphpphp-7.1.12-Win32-VC14-x64ext下,然后在php.ini文件中添加extension=php_phalcon.dll。重启服务器,查看扩展是否安装成功,如果成功的话会看到代表扩展安装成功。

    2.接下去要安装一个脚手架工具phalcon-devtools,下载地址https://github.com/phalcon/phalcon-devtools,将文件解压至www目录,设置环境变量,指向该目录



    接下来测试是否ok,打开cmd,运行phalcon,


    说明ok。

    使用命令:

    phalcon create-project store
    1
    会生成框架,

    3.在phpstorm中自动生成controller和model,File/Settings/Tools/command Line Tool Support

    点右上的+号

    选择Custom tool,点击OK,


    Tool path为phalcon-devtools的目录,点击ok。重启phpstorm,这时候就可以自动生成controller和model了
    命令:

    phalcon controller --name test //自动生成TestController

    phalcon model--name test //自动生成表名为test的model

    4.但这个时候还有个问题,phpstorm没有phalcon的代码提示。
    解决办法:打开phalcon-devtools文件下ide文件下的gen-stubs.php,修改第15行代码,修改为

    define('CPHALCON_DIR' , 'C:phplaragonwwwphalcon-devtools-master');
    1
    第2个参数是你目录的位置。

    然后执行命令

    php gen-stubs.php
    1
    这时候会在ide文件下生产1个带版本名称的文件夹

    打开phpstorm,右键,

    然后

    选择Specify Other,然后选择ide下生成的版本号目录下Phalcon目录,点击OK,

    重启phpstorm,这个时候phpstorm能够识别phalcon的代码了
    ---------------------
    作者:404_not__found
    来源:CSDN
    原文:https://blog.csdn.net/sun_jialei/article/details/80220017
    版权声明:本文为博主原创文章,转载请附上博文链接!

  • 相关阅读:
    (转)NandFlash详述
    (转)Redhat Linux 硬盘挂载方法!!!
    为Linux虚拟机挂载SD卡!
    DECLARE_GLOBAL_DATA_PTR 作用
    NAND FLASH ECC校验原理与实现
    Ehcache学习笔记(三) 与Spring集成
    ExtJs ComponentQuery 组件选择器
    好记性不如烂博客之 Quartz HowTo: Update an existing job
    使用WeakReference 与 ReferenceQueue 简单实现弱引用缓存
    Ehcache学习笔记(四) Web Caching 页面级别缓存
  • 原文地址:https://www.cnblogs.com/grimm/p/10442128.html
Copyright © 2020-2023  润新知