Posts by robertaodj • 989 points
22 posts
-
0
votes0
answers507
viewsQ: Encrypt in php and decrypt in javascript
Want to store in a text file, at the root of my application, a key generated by PHP, as a salt. That key would help encrypt passwords, database access information. That is, such information would be…
-
0
votes1
answer221
viewsQ: Autoload no Javascript
I’m starting in Front End and wanted to know the best technique and tool/library to load dependency files on Javascript. I feel I could add in my html just a file . js and in this file control the…
-
1
votes1
answer72
viewsQ: Taking hidden data with the <noscript> tag file_get_contents
I would like to retrieve a CAPTCHA information from one form and display it in another using the file_get_contents. It turns out that the page where the data is has the tag <noscript> that…
-
1
votes2
answers189
viewsA: Which Exception should I release according to each situation?
In accordance with this explanation, the exceptions derived from LogicException should be used to notify developers about logic issues in the application (by email or log). The exceptions derived…
-
2
votes1
answer81
viewsQ: Delete symbol from the last position of a string, optimally with PHP
I would like to delete the last character of a string if it is a symbol. I know I could do it in a complex way like the following function: $string = "minha_string_com_simbolo_no_final_"; function…
-
3
votes3
answers270
viewsQ: Simplifying an Array - PHP
I have a multidimensional array where the data lies as follows: Array ( [0] => Array ( [0] => Array ( [0] => Brasil [1] => Franca [2] => Italia [3] => China ) ) ) I would like a…
-
0
votes0
answers54
viewsQ: Configure multiple logs in Apache
I am working on an internal network where they are running 3 applications on the Apache server. I would like to be able to analyze the log generated by Apache separately for each application but…
-
3
votes1
answer51
viewsQ: Check whether array is associative in a class
I have a class where I need to do certain checks on an array, such as checking whether it is associative or indexed. I know there is no native function in PHP that does this, so I could use the…
-
0
votes1
answer185
viewsQ: Test autoload problem with Phpunit and Composer on Windows
I’m having a problem with the Composer on Windows 7. I developed a project with the following structure: Simpla_HTML |--/src | |--/Simpla | |--/Html | |--/Element.php /---tests | |--/Simpla |…
-
2
votes1
answer930
viewsQ: Autoload PSR4 class
I would like to create a class of autoload to follow the recommendations of PSR4 which can be used jointly and independently of the autoload of the Composer. The application I’m creating will have…
-
0
votes1
answer82
viewsQ: htaccess rules for searches
I am using the following htaccess code: <IfModule mod_rewrite.c> RewriteEngine on # Include in the next line all folders to exclude RewriteCond %{REQUEST_URI} !(app/view/*|web/*) [NC]…
-
1
votes2
answers271
viewsQ: Create a bottom bar with Tabs
Is there any jQuery plugin that creates an options bar like the one in the project PHP Debug Bar? Does anyone have any suggestions for implementation? The "Messages | Request | Timeline" is a thin…
-
3
votes2
answers873
viewsQ: Difference between two Multidimensional Arrays with PHP
I have these two multidimensional arrays and would like the difference between them, similar to what the function array_diff does, but with multidimensional arrays: $array_1: Array ( [0] => Array…
-
2
votes1
answer5139
viewsA: Close internal modal bootstrap without closing external modal
After a few days the solution: Change the parameter data-dismiss for any name other than modal so that the modal father not be closed when clicking on "Quit" or "x". <!-- MODAL INTERNO -->…
-
2
votes1
answer5139
viewsQ: Close internal modal bootstrap without closing external modal
I created a form using the Bootstrap Framework that opens in a Modal and this has a list of data that can be deleted but require a confirmation. It happens that when clicking the "Exit" button or…
-
18
votes5
answers3306
viewsQ: Form submission security in HTTP header
After some tests on the site of Yahoo and Facebook I realized that after filling in my username and password and clicking on Login, with the developer tools opened in the option Network (Chrome or…
-
8
votes1
answer348
viewsQ: Collapse Menu after page refresh with localStorage
How can I close a menu and keep it closed after the refresh of the page using jQuery only? It would be something like at this link. By clicking the button the menu is reduced and remains so even…
-
29
votes3
answers10218
viewsQ: How to create a real-time notification system similar to Stack Overflow?
I am developing a Help Desk system, and would like some ideas on how to create a notification system similar to Stack Overflow itself, whenever some new support is registered. I intend to use PHP,…
-
1
votes2
answers703
viewsQ: Select an array based on the value of an internal key
I have the following array: Array ( [ajax.js] => Array ( [name] => ajax [fileName] => Web/js/App/ajax.js [file] => ajax.js [path] => Web/js/App [parent_path] => App [extension]…
-
3
votes1
answer306
viewsQ: PDO deletes columns with equal names
I realized that by using the PDO to execute the query below, the results are conflicting with the PhpMyadmin and the Console do Mysql: SELECT a.*, n.* FROM arquivo AS a INNER JOIN numeracao AS n ON…
-
3
votes4
answers650
viewsQ: Return multiple arrays using a buffer without overloading memory
I’m developing an application where, in a report, I need to print something around 50,000 lines. When having run SELECT error occurs: Fatal error: Allowed memory size of 134217728 bytes exhausted…
-
4
votes2
answers6308
viewsQ: Optimize Mysql tables
I work with some huge tables in a system I developed. These tables are constantly being updated and sometimes the query becomes slow. Some of them even have more than 100,000 lines. I would like to…