Posts by Szag-Ot • 1,160 points
33 posts
-
1
votes1
answer140
viewsA: Angular Folder Upload (not just multiple files, but the entire directory)
I managed to solve, follows solution for those who have the same difficulty: In HTML just use the attribute webkitDirectory to allow the sending of a folder. This alone will already solve the…
-
3
votes1
answer140
viewsQ: Angular Folder Upload (not just multiple files, but the entire directory)
I’m using ngx-admin with Nebular for a Dashboard project. My following code works well to send multiple files. However an error occurs when trying to send a folder (dragging the folder to the file…
-
2
votes2
answers161
viewsA: 'addeventlistener is not a Function', why does this occur?
You can use the event on jQuery. So: carrosselPai.on("touchstart", function(e){ handleStart(e); }); carrosselPai.on("touchmove", function(e){ handleMove(e); }); carrosselPai.on("touchcancel",…
-
2
votes2
answers111
viewsA: Mobile Swipe: Hangs when moving your finger on the screen quickly
The page scroll is messing up your script. Just disable it via CSS: html, body{ overflow: hidden; } hope I’ve helped ;)
-
5
votes2
answers287
viewsQ: Mysql query - Cross Tables count
I have the following tables: Each tuple of the table Pageviews (main) contains a single page view. If by chance the same person in the same session (Sessions) view the same page (Pages), a new tuple…
-
2
votes1
answer4159
viewsQ: FATAL ERROR: No such file or directory in Unknown on line 0
After the system upgrade (to Windows 10 1709) started giving the following error in running PHP: Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 Fatal error:…
-
1
votes1
answer1598
viewsA: Add values from a php string
You can make the sum normally. But if you want to ensure that the return of getQVol() always be whole, and do not have access to class to change, you can do so: <?php $soma = 0; foreach…
-
1
votes2
answers212
viewsA: How to copy a piece of text within a textarea
preg_match and preg_match_all use REGEX and return a Boolean indicating whether the (default) expression has been found. About Regular Expressions you can ask your questions here and test here As…
-
2
votes2
answers255
views -
6
votes1
answer720
viewsQ: SOAP WCF request in PHP
I am trying to consume a web service from a shipping company. However, PHP is not mounting the request correctly. Request in PHP: <?php $client = new…
-
3
votes2
answers255
views -
5
votes2
answers2069
viewsQ: Doctrine: Manytomany’s Relationship with Extra Fields
I have a many to many relationship between two tables: Products and Orders. The Doctrine then generates a third table. So far quiet. But wanted to generate in this third table more fields (Qtde and…
-
3
votes2
answers342
viewsA: exec does not work - apparently runs the same call file
The problem was the safe_mode php, for the exec work with php itself (php [ file ]) safe_mode cannot be active. http://php.net/manual/en/features.safe-mode.php…
-
1
votes2
answers342
viewsQ: exec does not work - apparently runs the same call file
I have a time consuming script that prevents the execution of other processes while it does not finish. As a solution, I decided to create a file that runs it by the exec command (Mkt-start.php).…
-
3
votes1
answer1220
viewsQ: PHP Built-in and htaccess - Route System / User Friendly URL
I have a file. htaccess for route diversion on the server (production) and a router.php file for route diversion using PHP 7’s Built-in server. php -S 0.0.0.0:8000 router.php However, I would like…
-
2
votes3
answers1997
viewsA: Pagseguro getPaymentMethods Error
Apparently, he’s not recognizing the Session ID used. How are you doing to get the Session ID? The correct one, which should be done on the server side, would be something like this (example in PHP,…
-
3
votes1
answer1112
views -
8
votes1
answer2872
viewsA: Problem between Pagseguro and number of installments
I recently made an integration with the transparent Pagseguro, and I came across this and other difficulties. Suppose q vc is using their official PHP library (https://github.com/pagseguro/php),…
-
9
votes2
answers1839
viewsQ: Which one performs better? For or Foreach+Range?
Of the two forms below, which has a better performance? For: for( $x=1; $x < 31; $x++ ) echo $x . PHP_EOL; Foreach + range: foreach( range(1,30) as $x ) echo $x . PHP_EOL; I know the difference…
-
1
votes1
answer505
viewsQ: Is there a need to install a php plugin in Aptana 3, like PDT for example?
I started using Aptana Studio as an IDE to develop in PHP, especially because of the ease in controlling tasks, as well as the full integration with Git. But I feel as if it is not complete to…
-
3
votes1
answer130
viewsQ: Check running of execCommand in firefox ('Copy' command)
I’m having trouble checking if firefox ran the.execCommand element command ('Copy', false, null). This check is being done correctly in Chrome (which does not allow) and IE (which allows). Could you…
-
1
votes5
answers6499
viewsA: Save the binary content of an image in the database
If what you want is to simply save an image in BD, follow suggestion of how to do: Listing 1: Table creation script in the database CREATE TABLE PESSOA ( PES_ID int NOT NULL AUTO_INCREMENT PRIMARY…
-
4
votes4
answers1730
viewsQ: How to display "Update your Browser" warning when it does not support HTML5?
How to show the warning "Update your Browser" when the user browser does not support HTML5 tags or CSS3 properties? One initiative that encourages this is the website…
-
7
votes3
answers9179
viewsA: Integration with SIGEP Post
I appreciate the help, but I’ve come up with a solution of my own. If interested, follow the class below. The class connects mentioned (and related to the class by composition in the constructor…
-
4
votes3
answers9179
viewsQ: Integration with SIGEP Post
I need to integrate with the SIGEP Post API just to generate the tags. I am using the ready-made Github module (https://github.com/stavarengo/php-sigep). It makes the connection normally, but the…
-
3
votes1
answer2103
viewsA: Running processes in the background - Accessing same script twice
Okay guys, I appreciate you taking the time to help me (especially @Sergio), but I found the solution. The problem lies in a simple mistake. I had done it before, but it was a long time ago... I…
-
3
votes1
answer2103
viewsQ: Running processes in the background - Accessing same script twice
I have a PHP script that aims to integrate with a third party system. Basically, my script sends image and text files to the client’s ftp. To ensure processing for a long time, I use the following…
-
4
votes4
answers3838
views -
9
votes1
answer9877
viewsA: Put Authorization: Basic in the api
The method of sending and interpretation is very simple. It is basic ;) Sending Code <?php ob_start(); $user = 'usuário'; $pass = 'senha'; $ch = curl_init(); curl_setopt( $ch, CURLOPT_URL,…
-
1
votes1
answer390
viewsA: PHP blank page in Prod server but all OK in local
The problem may be on this line: require_once('conn.php'); Or in this: require_once ('Classes/'.$class.'.php'); You are calling another(s) file(s). What he(s) does(in)? Something that helps to know…
-
4
votes1
answer1320
viewsQ: How to Create a New Account (Domain) via SSH?
A while ago I asked a question - already solved - regarding how to do an automatic update remotely using PHP (See here) Now I would like to create via SSH a new account on the server in order to…
-
9
votes4
answers844
viewsA: rtrim() to remove "<br>" also removes the letter "r" if it is the last letter in the string
You are including 4 items for deletion at the end of your string: <,h,r and >. Why not make use of the good old regex? <?= preg_replace('/<hr( \/)?>$/i', '', $string); ?> This will…
-
3
votes1
answer915
viewsQ: Automatic remote upload of zipped file in PHP
I have a PHP e-commerce system installed for several clients. However, every time I update the system, I have to manually upload the new files to all clients. I’d like to automate that. One solution…