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

php包含带/名字的文件?

can anyone tell me if it's possible to include a file that includes a / in the filename? Does the name need to be escaped a certain way when calling it in include? Or not possible. ie. my.file/name.inc.php

Yes, of course it's possible. Just include the file.

require_once('path/to/your/file.php');

A filename can't contain directory separator in it's name on any platform so everything will be okay.

近期文章

  • 如何在PHP中获取系统时间?
  • 为什么我的两个PHP正则表达式都失败了?
  • 可能与JQuery冲突
  • PHP html表单没有更新DB [关闭]
  • 更改数据库中的用户名
  • 与Behat和Mink的Zombie.js
  • 新手刚入门,做了个找零程序,求大佬看下。
  • 为什么运行刚打开的时候输入法老是自动跳到中文输入?为什么运行的结果是-79啊?字符的比较大小不是用ASCLL比较的吗?
  • 水仙花数莫名其妙少一个153
  • 运行lisp程序遇到:should be a lambda expression,如何解决?
  • 过滤/排序用户评论PHP
  • 减去2日期时的错误值[关闭]
  • Php多个电子邮件收件人
  • 前端的PrestaShop错误
  • GET变量的PHP值是0?
  • php类名称区分大小写
  • Wordpress循环不起作用[关闭]
  • 用户定义的会话处理
  • PHP和MySQL - >显示数据
  • PHP数组中的大括号

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

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

友情链接:代码精华