Welcome To Snipplr
Everyone's Recent PHP Snippets Tagged php
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
In a Project i had to save serialized arrays in a MYSQL Database, when i used that i got a Error Message for no reason (Error at offset XX of XX bytes in...). I wrote this little functions to fix that issue. (I dont recommend to save serialized Arra...
0
2072
posted 16 years ago by FreaKzero
This snippet can be called in every controller, all you need to do is to specify the form name, the model name and the data.
1
1839
posted 16 years ago by stolkchris
If you need to add some content to your pages without having that content in your database you can use Wikipedia API. You can, for example, need to add automatically a simple description to a city name, or to a band name. Or you could need to add the...
1
2352
posted 16 years ago by ginoplusio
All code should ideally go into your theme\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'s template.php file. I\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'ve used the default Garland theme here as an example.
0
1903
posted 16 years ago by hiddentao
A simple one liner that updates the Auth component's session variables when the user model is updated
0
1504
posted 16 years ago by robksawyer
Allows you to still view PHP parse errors, even if you don't have write access to your php.ini file. Since PHP pages are parsed before being executed, parse errors won't show up even if you turn on display_errors in the page you are checking.
2
1761
posted 16 years ago by Moridin
It's fun to read what I wrote ages ago. An ORM that was heavily influenced (or should I say misguided) by CakePHP, lol.
2
2035
posted 16 years ago by fredwu
Here's a little trick I started using when working with XAMPP for localhost and keeping things in tune with the live configuration variables such as username and passwords to mysql (or whatever you're writing for).
The example below figures your w...
1
1651
posted 16 years ago by jackkeller
Paste the code in a file named style.php. Don’t forget to include your css files . Once done, open your HTML document and import style.php as you’ll import a css stylesheet.
3
2075
posted 16 years ago by math89