Questions tagged as 'php'

3
answers

Error in declarations with Array

Well, I have an error that I can not find the solution. I have two hosting in the same place Hostgator, in a hosting my application is all right and working. But I needed to migrate the application to another address, in other words I migrated t...
asked by 09.08.2016 / 15:39
1
answer

Is it a bad practice to use empty interfaces?

I've heard comments that would be a good idea when a future implementation can occur. I've also heard that it's a bad practice. I know that in PHP, for example, there is an interface called Traversable who has nothing. It serves onl...
asked by 24.07.2015 / 17:31
1
answer

Make 301 redirect in specific urls

How do I do in htacess redirect 301? But in specific urls, I changed my domain, and migrated the posts for example: myite.com.br/artigo/nomedoartigo Make a 301 redirect only when you have / article / Ai when people who access the old url t...
asked by 16.07.2017 / 18:40
2
answers

Use IP or LOCAL that the user is (or closest to) to send a query [duplicate]

I have the following code: function getpage($url, $postdata=''){ $c = curl_init(); <br> curl_setopt($c, CURLOPT_URL, $url); curl_setopt($c, CURLOPT_SSL_VERIFYPEER,false); curl_setopt($c, CURLOPT_SSL_VERIFYHOST,false);...
asked by 19.07.2017 / 08:31
0
answers

Is there any famSF PHP-style JSF?

I'm a Java programmer and I use JSF on the projects of the company where I work. I'm developing a personal project and I've chosen the PHP language to learn a bit more. The problem is that I saw a huge difference compared to programming with...
asked by 06.07.2017 / 01:13
1
answer

Htaccess Login and Password [duplicate]

I'm having a problem, I have a directory of different files of type csv, xls, pdf, docx ... I wanted the person.h that put in the browser the file link did not have access to it, only those that made access by the login page had access. How do...
asked by 14.07.2017 / 16:50
1
answer

Open email client with php attachment file

I'm trying to open my email client (for example Outlook) with the following: <a href="mailto:[email protected]?subject=Assundo email&body=Corpo de email"> Send mail</a> Now I wanted to send an attachment by mailto...
asked by 12.07.2017 / 13:08
1
answer

Socket PHP lives falling [closed]

I wentogle and found ways to work with the socket. Then I started the service in my VPS. At first it was working ok. However, now, from moment to moment, the Socket drops, causing me to need to access ssh at any time to restart it. Would you...
asked by 10.07.2017 / 16:28
0
answers

Request on the same page with XMLHttpRequest

Good morning, I am using a script with 3 files. - > index.php (where the request is made) -> contact.php (it is the search and processing of the request) -> ajax.js (which reads and loads the contact.php file by XMLHttpRequest) Problem,...
asked by 26.06.2017 / 10:01
0
answers

How does sockets work in php [closed]

I've been lately having to work with real-time updates, so I've been trying to figure out the sockets, more specifically to use in php. I'm doing a simple example based on in these codes , the problem is that when sending the form the page gene...
asked by 28.06.2017 / 01:24