How to fix “Headers already sent” error in PHP

No output before sending headers! Functions that send/modify HTTP headers must be invoked before any output is made. summary ⇊ Otherwise the call fails: Warning: Cannot modify header information – headers already sent (output started at script:line) Some functions modifying the HTTP header are: header / header_remove session_start / session_regenerate_id setcookie / setrawcookie Output can … Read more

regex match any whitespace

Your regex should work ‘as-is’. Assuming that it is doing what you want it to. This means match wordA followed by 0 or more spaces followed by wordB, but do not match if followed by wordc. Note the single space between ?! and wordc which means that wordA wordB wordc will not match, but wordA wordB wordc will. Here are some example matches and the associated replacement output: Note … Read more

Visual list of all installed fonts with respective pangram phrase?

“Open the Fonts dialog (Windows->Dockable Dialogs->Fonts) Right click any font in the list Choose ‘Render Font Map’ In the dialog that appears, leaving the ‘Filter (regexp)’ blank will list all your installed Fonts.” Source: http://gimpforums.com/thread-font-examples This forum thread clearly lists the steps for rendering a sample of each font in your GIMP library. I hope that this … Read more

What is a slug?

A slug is a part of the URL when you are accessing a resource. Say you have a URL, such as the one below, that displays all of the cars in your system: When you would want to reference a particular car in your system, you would provide the following URL: Notice how the URL … Read more