Posts by TutiJapa Wada • 666 points
30 posts
-
0
votes0
answers21
viewsQ: I want to divide 0.01 cents by 4, the result is 0.0025 how to store in mysql?
I want to divide 0.01 cents by 4, the result is 0.0025, I want to store this value in mysql which dataype I use in column?
-
1
votes0
answers9
viewsQ: How do I use 2 mail drive in the Windows in Runtime?
A part of my application, I need to use Sendgrid to send dirty emails (marketing/welcome/forgot password etc...) and another part of my application I need to use Mailchimp (Campaigns) in the case…
laravelasked TutiJapa Wada 666 -
2
votes1
answer167
viewsQ: Use Laravel’s Crypt without using the framework?
I need to use the "Crypt" component but separate without using the framework, I installed it via Composer. https://github.com/illuminate/encryption include 'vendor/autoload.php'; use…
-
1
votes3
answers801
viewsQ: How to concatenate an object with a variable to be dynamic?
Guys I have trouble in angular I have my object user = {name: 'Alexandre', email: '[email protected]'} I need a way to show on the console var attr = 'name'; var attr2 = 'email'; insira o…
-
2
votes1
answer1186
viewsQ: How do I reset the third decimal place in php?
I need a help, I have following problem, I need to round up the third decimal place, as I do? EX: From 3.49 converts to 3.50 From 3.48 converts to 3.50 From 3.43 converts to 3.50 From 3.42 converts…
-
3
votes1
answer280
viewsQ: How do I show the path of the php script running under the linux ps command?
How do I find the script path (eg: /var/www/html/script.php ) of PID PHP by the command ps linux? I’m in big trouble, have some PHP script consuming a lot of memory and cpu, when I give the command…
-
3
votes2
answers175
viewsA: login system using php and mysql
It’s wrong that $username = $_POST; $pwd = $_POST Correct is so $username = $_POST[user]; $pwd = $_POST[pwd]; That use and pwd comes from the form html in the input name='user' and input name='pwd'.…
-
3
votes0
answers418
viewsQ: Why is PHP’s CURL so slow? compared to wget/Browse?
I’ve been working with the CURL of PHP 5.6, it is extremely slow with respect to other resources like wget/browse/file_get_contents. In a REQUEST POST simple, it has delay of 4-10 seconds compared…
-
3
votes2
answers763
viewsQ: Trigger in Mysql VS logic in PHP application?
I am doing inventory control system, and I would like to know the advantages and disadvantages between two forms of implementation to subtract the number in stock after a sale/output. 1) Carrying…
-
2
votes2
answers115
viewsQ: What is the linux text editor command that I can see output in real time?
What is the linux text editor command that I can see output in real time? For example I want to give a "vim" in the access log of my apache I want to see GET entering the log in real time which…
-
-1
votes1
answer449
viewsQ: How do I make this panel with bootstrap grid system?
I know how to use the bootstrap grid system but in this project I need to do the Row class has height size and aligns with the other grid I will post an example here…
-
4
votes1
answer2870
viewsQ: Better PHP-FPM configuration for 4gb ram?
I need help setting up my PHP-FPM I have EC2 on Amazon C4.large 3.75 GB RAM 2 CORE On my server I only have PHP-fpm,NGINX and an ftp server connected, Mysql is on a RDS. My current php-fpm…
-
0
votes0
answers76
viewsQ: Is there a socket.io event that activates when the client’s internet is slow?
Hello. I am in a project in nodejs + socket.io, I am with big problem, in relation to the client’s slow internet, I need to know if in socket.io there is some kind of event like this // If the…
-
1
votes1
answer61
viewsQ: How do I concatenate a variable into a class with Static function?
Guys I’m having a problem, I have function that when passing card number returns the flag name (visa, Maxcard etc) And I need to return the flag name within a Statica function $bandeira =…
-
1
votes2
answers6151
viewsQ: Which Mysql command kills the process if a query takes more than 20s to execute?
People would like to know some configuration command in mysql, which kills the process if the query takes more than 30 seconds to return some result exists ? as ?
-
0
votes0
answers25
viewsQ: Cloudflare is corrupting my files?
Guys, after I’m using cloudflare service (caching and protection) my files . static zip when clients download, it comes corrupted, being that inside the server it is normal.. someone has already…
-
1
votes1
answer1809
viewsQ: How do I make crontab run a shellscript?
Guys I have a . sh and I’m having difficulty making it run on crontab every minute Example I have my file . sh /var/www/exec/checarservidor.sh it is with due permissions. add it to crontab * * * * *…
-
0
votes1
answer79
viewsA: Eviando responses from a php poll via array to an email using the php mail function
$Perguntas = array( "Primeira Opção" => "$primeira_opcao", "Segunda Opção" => "$segunda_opcao", "Terceira Opção" => "$terceira_opcao", "Quarta Opção" => "$quarta_opcao" ); // cria…
-
2
votes3
answers1441
viewsA: PHP Regex Catch the html tag
// String a ser tratada $string = "<table>|<tr>[<td>#VALOR#</td>]</tr>|</table>"; // Expressão regular $regex =…
-
0
votes2
answers812
viewsA: How to extract video ID from youtube urls?
I created a function for your problem, study it, and can implement more url formats by adding after the if/elses in case I created only for your 2 url formats case. <?php function…
phpanswered TutiJapa Wada 666 -
2
votes3
answers1052
viewsA: Validation of MVC forms - PHP
It is recommended to use validation within the model, and how much to use php code in the view can, but only to render some data coming from the controller. Example, use foreach/variables/for etc to…
-
2
votes1
answer1357
viewsQ: How to use the ob_flush() function to return data to the browser in an animated way?
I need help, I have an email sending system, I need to know what’s going on in the process back-end a log that returns to the browser, when triggering script, example I want to send email to 2…
-
0
votes1
answer140
viewsA: Doubt about data return in PHP POO
All you have to do is set session_start() in the __construct, case after login you already put the $_SESSION['nome'] then I’d be like this: public function getUserName() { return $_SESSION['nome'];…
-
1
votes2
answers897
viewsA: phpmailer causes syntax error error, Unexpected T_FUNCTION when hosted
Log in to class.phpmailer.php and go to line 3040 and replace the code with this. protected function clearQueuedAddresses($kind) { //if (version_compare(PHP_VERSION, '5.3.0', '<')) {…
phpmaileranswered TutiJapa Wada 666 -
0
votes5
answers737
viewsA: How to save data from a changed grid?
You will need to have little knowledge in jquery/js. 1° Creates 2 array variables. var deleteID = new Array(); var updateID = new Array(); 2° You will create an onchange event in all grid fields,…
-
3
votes1
answer1480
viewsQ: Which sublime t 2/3 plugin name indicates syntax error in php language?
I need to know some sublime text 3 plugin that it indicates error in the syntax of real-time debuger code like the one in phpStorm... someone knows?
-
0
votes1
answer352
viewsA: Nginx, prioritize folders instead of "Location /"
Nginx works top to bottom configuration order, that is to summarize you have to put the Location of the folder you want to access above Location / or you inserted a rewrite inside the Location ordme…
-
5
votes1
answer1209
viewsQ: Is there any way to access a cookie from a different domain?
Is there any way I can access a cookie from a different domain? For example: there is a cookie on facebook.com.br and I want to access cookie data within my site www.fulano.com.br .
-
1
votes1
answer704
viewsA: How to get dynamic data returned by Curl?
You’ll need to understand about regular expression to cut out parts of what you want to extract from HTML or if you can’t study that native PHP lib http://php.net/manual/en/book.dom.php it can…
-
2
votes1
answer67
viewsA: Delete expiration date information in Wordpress posts
It does so puts the day in a variable $day. and checks if it is 0 it does not show the day. <?php $date_now = date('d/m/Y H:i:s', current_time('timestamp', 0)); $date_expire =…