I’m attempting to use get_where to grab a list of all database records where the owner is equal to the logged in user. This is my function in my controller; function files() { $owner = $this->…
Invalid JSON parsing using PHP
I’m pulling a JSON feed that is invalid JSON. It’s missing quotes entirely. I’ve tried a few things, like explode() and str_replace(), to get the string looking a little bit more like valid JSON, but with an associate JSON string inside, it generally gets screwed up. Here’s an example:…
regexp with russian lang
I can’t solve my problem with regexp. Ok, when i type: everything is ok, except situation with Russian language. so, i try to re-type this reg-exp: but this not working, i know some idea, just write: but this is crazy 😀 please, give me simple variant Answer Try a Unicode range: Don’t forget the /u…
PHP session not working with JQuery Ajax?
Update, Solved: After all this I found out that I was calling an old version of my code in the update ajax. ‘boardControl.php’ instead of ‘boardUpdate.php’ These are the kinds of mistakes that make programing fun. I’m writing a browser gomoku game. I have the ajax statement that …
quoting constants in php: “this is a MY_CONSTANT”
I want to use a constant in PHP, but I also want to put it inside double quotes like a variable. Is this at all possible? define(“TESTER”, “World!”); echo “Hello, TESTER”; obviously outputs “Hello, …
How do I convert these coordinates to google map readable coordinates?
I need to convert coordinates in the following form: N42-53.9° W072-16.2° Into something that is like the following: -90.7311 0.346944 A php function would be greatly appreciated – or just a …
Sending email with gmail smtp with codeigniter email library
How do I cache a web page in PHP?
how do I cache a web page in php so that if a page has not been updated viewers should get a cached copy? Thanks for your help. PS: I am beginner in php. Answer You can actually save the output of the page before you end the script, then load the cache at the start of the script. example
How do I upload folders via FTP PHP
I’m writing a script that can FTP files and folders using PHP functionality. I’m able to upload files via ftp but not folders, is is possible to upload folders via PHP Ftp My file code looks similar …
mssql_bind empty string converting to NULL
I am currently using SQL Server 2000 Stored Procedures with PHP. Following the PHP doc, I use mssql_bind to assign value of parameters and then execute the Stored Procedure. The problem is that I got this bug which prevents me to bind empty strings to parameters (they are converted to NULL when the Stored Pro…