• How to get image file format if it doesn't have an extension? 2018-06-17

    I have a folder of image files. Some of them don't have any extension. I need to find their format and attach proper extension to them through PHP or shell programming in Linux/Ubuntu. Can anyone please help me how to do it? --------------Solutions--

    Tags: php
  • Could I use Capybara on frameworks outside Rails (PHP)? 2018-06-13

    I would like to test my php web app (specifically Magento) with Capybara. I've used Capybara with success when I used rails before so I want to replicate the success. Does anyone know if this is possible or maybe there is a Capybara for php? --------

    Tags: php, ruby on rails, magento, capybara
  • Convert PHP MySQL Code to MySQLi 2018-06-12

    I use the code below for a login system on my site. A lot of programmers on other sites said this code is not safe in any way, but the login system I created is huge. I can't rebuild it all, that takes ages for a beginner programmer in PHP. <?php $de

    Tags: php, mysql, mysqli
  • Android/PHP: how to POST/GET JSON data from Android to php 2018-06-11

    Android/PHP: how to POST/GET JSON data from Android to php? Currently I am stuck at a point where I am sending JSONObject data to php but getting NULL values always in response. What I want: I am sending 'username' and 'password' from Android in the

    Tags: php, json, android
  • php code to display 1 or 0 based on two dates 2018-06-11

    table name holidaymaster id Date 1 12-04-2015 My form has two filters. fromdate todate If user select FromDate = 01-05-2015 AND Todate = 31-05-2015 then it display all days between fromdate and todate in header. If Days between fromdate and todate is

    Tags: php, mysql
  • how to convert in url " _" to "-" useing htaccess 2018-06-07

    This question already has an answer here: In htaccess, I'd like to replace underscores with hyphens and then redirect the user the new url 2 answers I have a URL that looks like: How would I go about converting that URL

    Tags: php, .htaccess
  • How to decode SCC file? 2018-06-04

    After severals researches on Google and Github, I'm coming here to ask for help. I'm creating a SCC file parser in order to convert it to a DFXP file. Nevertheless, I can't find any information to obtain plain text from SCC file. SCC file example : S

    Tags: php, file, parsing, decode
  • Send mailer Symfony2 2018-06-04

    I use Symfony2. My Action send a message and then redirect to a page. Like this public function myAction() { ... some code ... sendMessageWithSwiftMailer() .... return $this->redirect(Url); } This code work. But Url takes so much time to be opened. H

    Tags: php, sendmail, symfony2
  • Restore magento quote after payment was refused 2018-06-04

    I'm creating a magento payment extension which does the following: When the user clicks on checkout in the merchant site, he gets redirected to a web site (like paypal) where he inputs his payment data. If the payment method fails, the user gets redi

    Tags: php, magento
  • How to multiply session values 2018-06-02

    I am trying to create a menu booking. if i select meal set 1 , the price is $100, meal set 2, the price is $200 and this selected value will multiple the amount of tables request below is my code but the price is showing $0 in total. if($_POST['Radio

    Tags: php
  • update my JOIN table 2018-05-31

    I have built a system where I can create a category and a document. the categories live in the cat_list table and the documents live in the doc_list table. there is a column in the doc_list table called cat_no which takes an array or the categories t

    Tags: php, mysql, pdo
  • Send Notification when new post is published in wordpress 2018-05-31

    Right now, I am sending notification to android application users when new post is created in WordPress. But issue is that, It sends notification also when draft is created and post is updated. Which condition should I put to send notification only w

    Tags: php, wordpress
  • Validation for Add screen not working but it working in edit screen with same code 2018-05-29

    I am learning Zend framework and currently I have created add, update , delete functionality for country name and continent name and it is working perfectly. I have set validation by $name->setRequired('true'); and $continent->setRequired('true'); i

    Tags: php, validation, zend framework, zend form
  • How to update the data according to the user selection in PHP 2018-05-29

    I'm trying to change the data according to the user selection in a list in real time. How would i suppose to achieve this task? For example: if the user selects the below information. How would you like to give us a feedback? <select> <option>

    Tags: php, html
  • Composer commands generate error on Windows 8 and Laravel 4 2018-05-27

    I am trying to run the command composer install from the command line and every time I do so I generate the following error: Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Nothing

    Tags: php, xampp, laravel, composer php
  • SimpleXML children's attributes behaves different with and without namespace 2018-05-27

    The SimpleXML examples page, section "Example #5 Using attributes" states: Access attributes of an element just as you would elements of an array. And the example #1 in SimpleXMLElement::children() works using $element['attribute'] syntax to acc

    Tags: php, xml, simplexml
  • Incrementing an array's value is causing warnings in the log 2018-05-24

    I am trying to create an array that holds the count of each course we offer based on location and then instructor. Here is sample code $courseCnt = array(); foreach($courseList as $course){ $courseCnt[$course['location']][$course['instructor']] += 1

    Tags: php, arrays
  • How to localize a language and redirect the user to a specific url with CodeIgniter 2018-05-22

    I have created a website in two languages with CodeIgniter: English (en) and German (de). The default page is: The url for en is: The url for de is Now I would like to redirect the user according t

    Tags: php, codeigniter
  • Insert data in Postgres with XML-RPC 2018-05-21

    I am trying to insert data into Postgres database by XML-RPC. Code for insert data in postgres database <?php $customer_array = array('name'=>new mlrpcval('Customer name',"string")); $client = new xmlrpc_client("

    Tags: php, xml, postgresql, xml rpc, openerp 7
  • Two associations for the same table resulting in a collision 2018-05-19

    I have videos and artists, video belongsTo artist and artist hasMany videos. I did it and is working, when I find videos and set [contain => ['Artists'] I got the result videos entity with the related artist. This first relationship is about the arti

    Tags: php, cakephp 3.0

Copyright (C), All Rights Reserved.

processed in 0.220 (s). 7 q(s)