I’ve probably spent over 12 hours trying to install FFMPEG on WAMP. I’m aware that other people have had this question answered on this site, however it does not work for my setup. I have tried the …
Count files and subfolders in directory
I am writing a script which counts all files and folders recursively. I tried two approaches but each of these returns a different value: Script 1: 2376 Script 2: 2178 Here are the two scripts: $…
Sorting a php array of arrays by custom order
I have an array of arrays: Array ( [0] => Array ( [id] = 7867867, [title] = ‘Some Title’), [1] => Array ( [id] = 3452342, [title] = ‘Some Title’), […
move_uploaded_file not working on Apache server in Linux Mint
So I am trying to do a basic upload via an HTML form and a simple php script, but the move_uploaded_file function always returns false. I have run “chmod 777” on the directory (I will deal with safety more when I actually get this to work) and the “upload” directory is in the htdocs fo…
need preg_match_all links
i have a string like this one: $string = “some text http://dvz.local/index/index/regionId/28 http://stuff.kiev.ua/roadmap_page.php http://192.168.3.192/roadmap_page.php http://192….
MySQL prepare vs PHP mysqli prepare
I was wondering if there was any difference between the MySQL PREPARE/EXECUTE clauses and the PHP mysqli prepare/execute methods? Are either better or worse at preventing injections? I am curious …
How to generate a temporary email for use in a web-application?
Example: if I want to upload a video to some video service website (such as Youtube) by email, I can send a video to an email address (e.g 1234567890@upload.youtube.com). The number is an upload code – It’s a unique number and changes every time. Then Youtube will process and upload my video autom…
UTF 8 and Windows 1254 charset mismatch
I’m using Drupal 7. And i created a block and embed this code: My site charset: And external link charset is: So, when get some info on external link, i have character problem (don’t seen İ, ç, ş etc..) How can i solve this? Answer In your block, I would create these two lines: so this page’…
How to force Doctrine to update array type fields?
I have a Doctrine entity with array type field: /** * @ORMTable() */ class MyEntity { (…) /** * @var array $items * * @ORMColumn( type=”array” ) */ private $…
Failure to connect to mySQL DB via PHP (msqli object-oriented issue)
I’m trying to connect from my Heroku app to a mysql db (Xeround) in an object-oriented way: $this->db = new mysqli( Credentials::databaseHost(), Credentials::databaseUsername(), …