Skip to content

Tag: php

CodeIgniter get_where

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 …

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 …