What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-09-15 19:56:03
how to create config file in php
<?php return (object) array( 'host' => 'localhost', 'username' => 'root', 'pass' => 'password', 'database' => 'db' ); ?> This allows you to use the object syntax when you include the php : $configs->host instead o... Add solution -
Other 2021-09-15 19:15:03
composser
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php -r "if (hash_file('sha384', 'composer-setup.php') === '795f976fe0ebd8b75f26a6dd68f78fd3453ce79f32ecb33e7fd087d39bfeb978342fb73ac986cd4f54edd0dc902601dc') { echo '... Add solution -
Shell/Bash 2021-09-14 23:32:02
install composer 2 ubuntu
sudo apt update sudo apt install php-cli unzip cd ~ curl -sS https://getcomposer.org/installer -o composer-setup.php HASH=`curl -sS https://composer.github.io/installer.sig` echo $HASH php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH... Add solution -
PHP 2021-09-14 07:02:01
run php script from another php
<?php include('log test.php'); $output = shell_exec('php filename.php'); echo "<pre>$output</pre>"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://localhost/Ia2/Watering/tests/log%20test.php"); //URL of the f... Add solution -
PHP 2021-09-14 06:50:02
php curl with headers
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"http://www.example.com/process.php"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,$vars); //Post Fields curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $headers = [ ... Add solution