I'm trying to get Google Plus Authentication into CodeIgniter using the following: https://code.google.com/p/google-api-php-client/
我正在尝试使用以下内容将Google Plus身份验证转换为CodeIgniter:https://code.google.com/p/google-api-php-client/
I have put these files in third_party/google-api-php-client/src
我把这些文件放在third_party / google-api-php-client / src中
If I was doing this without CI, I would simply use:
如果我在没有CI的情况下这样做,我只会使用:
require_once 'google-api-php-client/src/Google_Client.php';
require_once 'google-api-php-client/src/contrib/Google_PlusService.php';
What would be the CI equivalent way to "require" these files? I have tried doing
什么是CI等同于“需要”这些文件的方式?我试过了
require APPPATH .'third_party/google-api-php-client/src/Google_Client.php';
However get issued the following message:
但是发出以下消息:
Message: require(application/third_party/google-api-php-client/src/Google_Client.php): failed to open stream: Permission denied
消息:require(application / third_party / google-api-php-client / src / Google_Client.php):无法打开流:权限被拒绝
2 个解决方案
#1
5
download the third party library and put it inside your library or third party folder and the same you load your other libraries you can load this as will, check out this way i hope it will work
下载第三方库并将其放入您的库或第三方文件夹中,同样您加载其他库,您可以按原样加载它,看看这种方式我希望它能工作
$this->load->library('phpword');
for third parties. for google api check read out this i hope this will solve your problem https://github.com/joeauty/Google-API-Client-CodeIgniter-Spark
对于第三方。对于谷歌api检查读出这个我希望这将解决你的问题https://github.com/joeauty/Google-API-Client-CodeIgniter-Spark
#2
0
PHP does not have the required permissions to access the file. This can either be due to the group that the web server is running under not having read permissions on the file or because the file is not associated with the web server group. There are two ways to resolve this. The better option is to change the ownership of the file so that the web server group is associated with the file provided you know what group the web server uses. This can be done using the command chown myuser:www Google_Client.php
In this command replace myuser
with your user name and www
with the group that the web server runs under. If using this method the file permissions should be set to 640 using chmod 640 Google_Client.php
.
PHP没有访问该文件所需的权限。这可能是由于Web服务器在没有对文件具有读取权限的情况下运行的组,或者因为该文件未与Web服务器组关联。有两种方法可以解决这个问题。更好的选择是更改文件的所有权,以便Web服务器组与文件关联,前提是您知道Web服务器使用的组。这可以使用命令chown myuser来完成:www。Google_Client.php在此命令中,将myuser替换为您的用户名,将www替换为运行Web服务器的组。如果使用此方法,则应使用chmod 640 Google_Client.php将文件权限设置为640。
If you do not know what group the web server runs under you can change the file permissions so that all users and groups have read access to the file. This can be achieved by using the command chmod 644 Google_Client.php
.
如果您不知道Web服务器在哪个组下运行,则可以更改文件权限,以便所有用户和组都具有对该文件的读取权限。这可以通过使用命令chmod 644 Google_Client.php来实现。
#1
5
download the third party library and put it inside your library or third party folder and the same you load your other libraries you can load this as will, check out this way i hope it will work
下载第三方库并将其放入您的库或第三方文件夹中,同样您加载其他库,您可以按原样加载它,看看这种方式我希望它能工作
$this->load->library('phpword');
for third parties. for google api check read out this i hope this will solve your problem https://github.com/joeauty/Google-API-Client-CodeIgniter-Spark
对于第三方。对于谷歌api检查读出这个我希望这将解决你的问题https://github.com/joeauty/Google-API-Client-CodeIgniter-Spark
#2
0
PHP does not have the required permissions to access the file. This can either be due to the group that the web server is running under not having read permissions on the file or because the file is not associated with the web server group. There are two ways to resolve this. The better option is to change the ownership of the file so that the web server group is associated with the file provided you know what group the web server uses. This can be done using the command chown myuser:www Google_Client.php
In this command replace myuser
with your user name and www
with the group that the web server runs under. If using this method the file permissions should be set to 640 using chmod 640 Google_Client.php
.
PHP没有访问该文件所需的权限。这可能是由于Web服务器在没有对文件具有读取权限的情况下运行的组,或者因为该文件未与Web服务器组关联。有两种方法可以解决这个问题。更好的选择是更改文件的所有权,以便Web服务器组与文件关联,前提是您知道Web服务器使用的组。这可以使用命令chown myuser来完成:www。Google_Client.php在此命令中,将myuser替换为您的用户名,将www替换为运行Web服务器的组。如果使用此方法,则应使用chmod 640 Google_Client.php将文件权限设置为640。
If you do not know what group the web server runs under you can change the file permissions so that all users and groups have read access to the file. This can be achieved by using the command chmod 644 Google_Client.php
.
如果您不知道Web服务器在哪个组下运行,则可以更改文件权限,以便所有用户和组都具有对该文件的读取权限。这可以通过使用命令chmod 644 Google_Client.php来实现。