I am stuck and really don’t have any idea how can i do this. I want to upload an image to my server root directory. And then i want to use the url of that image. Like I want to use this url in a html page. Which will have no link with my website. anyone clicks that html file
Tag: php
Alternative for define array php
I’m looking for an alternative for define(‘name’, array) as using an array in define gives me this error: Constants may only evaluate to scalar values in … The array I’m mentioning contains strings only. Answer From php.net… The value of the constant; only scalar and null v…
PHP sessions don’t expire. Ever
I’m transferring my application to another server, but I have some issues with the PHP sessions that don’t seem to expire. In php.ini I’ve set: Cookies are enabled, of course. And still, after 5 minutes, if I refresh the page I’m still logged in. Even if I close the browser and reopen …
Check if specific array key exists in multidimensional array – PHP
I have a multidimensional array e.g. (this can be many levels deep): I am trying to loop through it to see if a certain key exists: But it finds nothing. Is there an error in the loop? Answer I played with your code to get it working :
How to change the colors of xdebug output?
The red and yellow standard colors of xdebug can hurt your eyes after a few hours. http://www.designified.com/blog/article/76/restyling-xdebug-output describes how to replace the style with javascript requiring jquery. I was looking for a more straight forward way and finally found one. Answer The solution is…
Can’t connect LDAP server – issue in ldap_bind();
I am tried to implement a LDAP authentication in my web application developed in ZF2. LDAP authentication is working fine in Windows 7. But, after moving the application to LINUX machine, LDAP authentication is not working. I am always getting the error as : Warning: ldap_bind(): Unable to bind to server: Can…
cURL error 35 – Unknown SSL protocol error in connection to api.rkd.reuters.com:443
From development machine (mac) there is no problem connecting via cURL in PHP to this, but in Ubuntu, I get this error. I’ve tried on a local machine and on an Amazon AWS instance. I’ve googled and googled and keep coming up to brick walls. There’s no firewall restrictions in place, its a co…
Why would json_encode return an empty string
I have a simple php structure with 3 nested arrays. I do not use particular objects and I build myself the arrays with 2 nested loops. Here is a sample of the var_dump of the array I want to convert to Json. In another script I have a similar structure and json_encode works fine. So I don’t understand w…
Line endings in a form textarea
Morning, When you post a form which has a textarea, what line endings are used? rn, n or like local files does it depend on the OS? I am tryring to find an RFC or W3C spec or something, or is it different based on OS/browser? Got a link? eg Would it be or and is it a standard or
Magento calculating totals through SOAP V2 API but Promotion Rules are not applying?
I’m using Magento Comunity Edition 1.7.0.2. I have to calculate Totals through Magento SOAP V2 API by passing it lineitems, shipping method , payment method, Addresses and Promotions (coupon code) info. I need to calculate the lineitems totals (Base price, Tax, disount , row total) and Subtoatl, shippin…