Posts by leoap • 555 points
10 posts
-
0
votes2
answers422
viewsA: Fatal error when creating a new Zend Skeleton Application module
Your Module.php file is in the wrong location, it needs to get in the root of your module folder: module/ Livraria/ config/ module.config.php src/ Livraria/ Controller/ IndexController.php view/…
-
0
votes1
answer39
viewsA: Variable does not work in script
You have two forms (<form>). By clicking the Submit button of one, only its data is submitted. If your idea is that the user first submits one form and then another, then you need to make a…
-
0
votes1
answer172
viewsA: Update a zf2 view every 1s via jquery/ajax
You will need a Javascript function to populate your table dynamically. This function must make a dynamic request (ajax) to your server to get the data to be entered in the table. With this function…
-
3
votes1
answer73
viewsA: How do I search between several db and present the result on the page itself?
If the Databases are all on the same server, just enter the database name before the table name. For example, assuming you have two Databases, DB1 and DB2: Example of query consulting DB1: SELECT *…
-
1
votes2
answers354
viewsA: Validate preg_replace domain
Just add the stitch to your pattern: $site = preg_replace("/[^a-zA-Z0-9\.]/", "", $_POST['site']); Is that \. at the end of the pattern. A \ is to escape the point (.), because in regular…
-
2
votes3
answers218
viewsA: Is it possible to load alternative . css links in case the primary link is not working?
Purely with html and css, I don’t know any method of making this comparison. But if you use a server language like php, you can get what you want. First step would be to delegate php to include your…
-
13
votes2
answers24995
viewsA: Javascript function that completes the field with zeros on the left
A simple single line solution: ("0000" + n).slice(-4) where n is your number: ("0000" + 1).slice(-4); // "0001" ("0000" + 12).slice(-4); // "0012" ("0000" + 123).slice(-4); // "0123" ("0000" +…
javascriptanswered leoap 555 -
6
votes2
answers1311
viewsA: Problem with the UTF-8
It is not enough to just set the charset. Your . html file (or any other extension) needs to be encoded as UTF-8. Open it in a code editor (like Notepad++, phpstorm, netbeans...) and check its…
-
4
votes3
answers815
viewsA: In PHP are all variables declared global?
You may get the impression that the variable is global due to the fact that you can access it (or at least try to access it without it resulting in a fatal error) without having previously defined…
-
9
votes3
answers1793
views