我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

仅包含一个PHP类文件一次

I'm using methods from a PHP class all over my code and I don't want to do "require_once" in every file I'm using that class. Is there a way to include the class in a single file, and then access it from everywhere in the code?

Thanks!

here ya go http://php.net/manual/en/language.oop5.autoload.php

You could potentially use the auto_prepend_file directive (http://php.net/manual/en/ini.core.php), which you should be able to set via .htaccess if you have no other method of doing so.

近期文章

  • Flink Sum计算
  • 一道C语言基础不好不清楚
  • SAS破译版是否可以安装在C盘?
  • ,请问这个怎么改才能运行呢
  • MATLAB运行错误
  • VMware虚拟机上安装centos7
  • 中缀表达式转换到后缀表达式
  • 单片机c52c语言程序
  • matlab编程出错
  • 通知偏好困境
  • 请求大神教我,很不理解
  • Blender oc和c4d oc区别在哪
  • 在ubuntu系统中说目标不是目录是怎么回事
  • 打不开Arcgis10.2软件
  • c语言实现学生信息管理系统
  • kibana安装启动报错如何解决详细步骤
  • 图像裁剪,输出的文件图像全黑
  • 文件编码全是感叹号,想一下怎么解决
  • log4j.xml不生效问题
  • 如何为php页面构建页面预加载器?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华