FreeKB - PHP articles
PHP articles

ArraysGetting Started with ArraysGetting Started with key value pairsAppend values to the end of an arrayAutocompleteAutocomplete user inputBanner messagesBanner messagesBold textMake text entered into a search engine boldbuilt in functionsCut a string using substrDebugging using print_rDebugging using var_dumpDisplay current user using exec whoamiEscape special characters using htmlspecialchars Present Working Directory using getcwdRemove whitespace using trim, ltrim and rtrimReplace values using preg_replaceRun a command using execSplit a string using preg_splitUpdate first character of each word to upper using ucwordsUpdate string to lower using strtolowerUpdate string to upper using strtoupperCaptchaCreate a captchaCommand Line Toolphp --version command line toolConfigurationGD moduleDate Timedate formatDOMPDFExport to a PDF using DOMPDFFilesCopy a fileCreate a file using fopenDelete a file using unlinkExport data to a CSV fileread file contentReplace file contentFormsGET form dataFPDFExport to a PDF using FPDFWrap text in a cell when using FPDFGET and POST$_GET request$_POST requestHeadersHTTP Headers ($_SERVER)Set HTTP_COOKIE Headerif elseif else statementsDetermine if a URL existsif elseif else statementsImagesUpload image files to a shared folder on LinuxUpload image files to a volume on DockerInsertPrevent duplicate entries into MySQLInstallInstall memcache on DockerInstall PHP FPM on DockerInstall PHP on LinuxInstall PHP PDO driver for mySQL MariaDBNginx and PHP FastCGI on Docker TCP port 9000Nginx and PHP FastCGI on Docker using UNIX socketJSONGetting Started with json_decodeLogsCreate a separate log file for PHP Log errors to a file using error_logLoopsforeach loopsPDOEnable PDO driver on Dockerphp.iniphp.ini on DockerRegular Expressions (regex)Escape aphostrophes using PDOForm data matchREST APIREST APISecretsUpdate first character to upper using ucfirstSessions / CookiesChange the name of a PHP session cookieCreate cookieCreating a Session ID using session_idEnable memcache for PHP FPM on DockerSecure web pages using sessions on DockerSecure web pages using sessions on Linuxsession.cookie-domain on DockerSet session during using session.gc_maxlifetimeSQL databaseConnect to Microsoft SQL ServerConnect to mySQL or MariaDBfulltext index search with MariaDBfulltext index search with Microsoft SQL ServerInstall the SQL Server driver in the php.ini fileSQL INSERT statement in PHPSQL SELECT statement in PHPSQL UPDATE statement in PHPSSH and SCPAuthenticate to an SSH server using ssh2_auth_passwordAuthenticate to an SSH server using ssh2_auth_pubkey_fileConnect to an SSH server using ssh2_connectEnable SSH for PHP FPM on DockerIssue a command using ssh2_execSCP (Secure Copy Protocol)SCP (Secure Copy Protocol) using SFTP (Secure FTP)TagsImplement a tags systemsTroubleshootingResolve "back button confirm form resubmission"Resolve "FastCGI sent in stderr Primary script unknown while reading response header from upstream"Resolve "ssh2_connect unable to exchange encryption keys"Resolve error "The file format and extension of example.csv don't match" Resolve move_uploaded_file not uploading fileVariablesAppend values to a variable using .=