I am making an image upload function which I can re-use in my code, which has to be 100% secure. Please tell me if you can spot and security holes in my initial code; UPDATE This is how far I’ve gotten with your help and some research, please tell me what you think. I don’t mind much about the spe…
How to round up value in PHP?
I have a value like this: $value = 2.3333333333; and I want to round up this value into like this: $value = 2.35; I already tried round, ceil and etc but the result is not what I expected. Please …
PHP Check if variable is contained in an array
I have a numeric variable $i. This is a while loop, and $i increments after each iteration. How can a conditional statement be made as to not be necessary to write such a long statement if($i == 1 || $i == 2 || $i == 25 […])? Thanks in advance! Answer Use php in_array.
jQuery not working when I echo it from PHP
I need only some js to run during some parts of a php script, for testing purposes I commented out the php so I am not going to show it here. The line I have labeled 1B works fine, the background image displays. The section labeled not working seems to have no effect but when I run it separately in
redirecting to another page through php if error is Occurred?
i have to check weather the page is having error,if error is there i have to redirect to one default page like error.php I have tried with the following link but i cannot get the result changes in my .htaccess my errors.php code suggest me any idea,Thanks in advance.. Answer Are you working on a local server/…
Understanding what u0000 is in PHP / JSON and getting rid of it
I haven’t a clue what is going on but I have a string inside an array. It must be a string as I have ran this on it first: $array[0] = (string)$array[0]; If I output $array[0] to the browser in …
PHP cURL returns FALSE on HTTPS
I’m trying to make a bot for: https://coinroll.it/api From the site: The Coinroll API is a stateless interface which works over HTTPS. Requests are made using POST variables (application/x-www-form-…
Web Based RDP Client
Can I permit RDP based connections from a website using PHP/JS/etc? I’ve read that RDP session files can be placed on the web server but would prefer to implement it via code. I am looking for the …
Causes of MySQL error 2014 Cannot execute queries while other unbuffered queries are active
My server runs CentOS 6.4 with MySQL 5.1.69 installed using yum with CentOS’s repos, and PHP 5.4.16 installed using yum with ius’s repos. Edit3 Upgraded to MySQL Server version: 5.5.31 Distributed by The IUS Community Project, and error still exists. Then changed library to mysqlnd, and seems to e…
set_time_limit() has been disabled for security reasons
I need to set set_time_limit(0); in my PHP script but I get Warning: set_time_limit() has been disabled for security reasons I already tried increasing max_execution_time property in my php.ini with no effect. I’m running WAMP 2.4 with Apache 2.4.4 and PHP 5.4.12. EDIT: I’m running it on my localh…