duanran6441 2011-06-16 23:02
浏览 47
已采纳

在Symfony中,我在哪个目录中放置自定义类?

In my symfony application I would like to create custom php class. And access that class via back end and front end. Can someone show me which folder should I put that class and how to access it?

Thanks in advance!

  • 写回答

1条回答 默认 最新

  • doushi8599 2011-06-16 23:47
    关注

    You can put it in the /lib folder. There it'll be autoloaded by Symfony .

    It's recommended to create subfolders in /lib to group classes/files by their function. (for example a directory /lib/routing for classes that concern the routing).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部