duanlongling5308 2015-01-24 12:53 采纳率: 0%
浏览 71

多个require_once和活动文件夹

I'm trying to implement Google APIs in PHP on WAMP, but I can't even manage to include the files.

My code is the following :

<?php
  require_once "./vendor/google/apiclient/src/Google/Client.php";

Client.php

require_once 'Google/Auth/AssertionCredentials.php';
require_once 'Google/Cache/File.php';
require_once 'Google/Cache/Memcache.php';
....

My error :

Warning: require_once(Google/Auth/AssertionCredentials.php): failed to open stream: No such file or directory in
C:\wamp\www\mysite\vendor\google\apiclient\src\Google\Client.php on line 18

How should I use include path, and similar commands to get Client.php to find what it wants ?

  • 写回答

2条回答 默认 最新

  • dongmaomou4117 2015-01-24 12:58
    关注

    There are multiple ways so that the file can be found. These include the absolute path or also using setting the include path. The include path can be set via:

    • php.ini
    • .htaccess
    • ini_set function
    • set_include_path function

    Please goole the one most appropriate for your use

    评论

报告相同问题?

悬赏问题

  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
  • ¥15 怎么配置广告联盟瀑布流
  • ¥15 Rstudio 保存代码闪退
  • ¥20 win系统的PYQT程序生成的数据如何放入云服务器阿里云window版?