Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在codeigniter项目中安装库PHPJ/PHPJ_Php_Codeigniter_Composer Php - Fatal编程技术网

如何在codeigniter项目中安装库PHPJ/PHPJ

如何在codeigniter项目中安装库PHPJ/PHPJ,php,codeigniter,composer-php,Php,Codeigniter,Composer Php,我正在使用PHP,我想在我的PHP代码中实现arraycopy 下面是我想在PHP中实现的Java代码 import java.lang.*; public class SystemDemo { public static void main(String[] args) { int arr1[] = { 0, 1, 2, 3, 4, 5 }; int arr2[] = { 5, 10, 20, 30, 40, 50 }; // copi

我正在使用PHP,我想在我的PHP代码中实现arraycopy

下面是我想在PHP中实现的Java代码

import java.lang.*;

public class SystemDemo {

   public static void main(String[] args) {

      int arr1[] = { 0, 1, 2, 3, 4, 5 };
      int arr2[] = { 5, 10, 20, 30, 40, 50 };
    
      // copies an array from the specified source array
      System.arraycopy(arr1, 0, arr2, 0, 3);
      System.out.print("array2 = ");
      System.out.print(arr2[0] + " ");
      System.out.print(arr2[1] + " ");
      System.out.print(arr2[2] + " ");
      System.out.print(arr2[3] + " ");
      System.out.print(arr2[4] + " ");
      System.out.print(arr2[5] + " ");
   }
}

我找到了一个在PHP中使用arraycopy的解决方案,这个解决方案引用了这个解决方案。但我不知道如何在我的codeigniter项目上安装此库。

这是一个未完成且已废弃的项目,为什么要使用它?因为没有其他库像此项目一样。我只需要使用该库中的arraycopy函数。您可以使用
array\u slice($arr1,0,3)+$arr2
实现同样的功能,您不需要java类库对数组执行一个简单的操作。如果出于任何原因,您确实只想使用,只需将代码带过来即可。请分享更多详细信息。你想要实现什么?您可以自己编写代码,也可以通过
composer