What do you want to save?
Add Code snippet
New code examples
-
PHP 2022-02-13 17:50:10
auto generate table of contents php
<?php function TableOfContents($depth) /*AutoTOC function written by Alex Freeman * Released under CC-by-sa 3.0 license * http://www.10stripe.com/ */ { $filename = __FILE__; //read in the file $file = fopen($filename,"r"); $html_str... Add solution -
PHP 2022-01-23 07:30:21
php append line to file
// LOCK_EX will prevent anyone else writing to the file at the same time // PHP_EOL will add linebreak after each line $txt = "data-to-add"; $myfile = file_put_contents('logs.txt', $txt.PHP_EOL , FILE_APPEND | LOCK_EX); // Second option is this... Add solution -
PHP 2022-01-23 04:11:12
php curl fail verbosly
curl_setopt($handle, CURLOPT_VERBOSE, true); $verbose = fopen('php://temp', 'w+'); curl_setopt($handle, CURLOPT_STDERR, $verbose); $result = curl_exec($handle); if ($result === FALSE) { printf("cUrl error (#%d): %s<br>\n", curl_errno(... Add solution