Posts by Yure Pereira • 3,971 points
117 posts
-
0
votes1
answer506
viewsA: Select in the database, only with jQuery
It is not possible as jQuery is a library developed in pure Javascrit as you probably should know or should, which is a scripting programming language interpreted by Browser(Browser) on the client…
-
2
votes3
answers8723
viewsA: Difference between "Attribute" and "Instance Variable"
In object orientation Attribute is a property or also known as field or variable that are belonging to a class, which are used to give characteristics to a class, as in the example below where we…
-
0
votes2
answers966
viewsA: Validating form with onsubmit and javascript
Make a non-asynchronous ajax request, because when asynchronous the code flow continues to be interpreted even if the request has not yet returned the server response, thus making the function of…
javascriptanswered Yure Pereira 3,971 -
0
votes2
answers204
viewsA: How do I type this url into . htaccess to get a friendly url?
According to the URL you want, you could do it this way: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$…
htaccessanswered Yure Pereira 3,971 -
2
votes1
answer3293
viewsA: MPDF error: Some data has already been output to browser
Do it: define('MPDP_PATH', 'MPDF54/'); include(MPDP_PATH.'mpdf.php'); ob_clean();//Limpa o buffer de saída $mpdf=new mPDF(); $mpdf->SetDisplayMode('fullpage'); $mpdf->WriteHTML($html);…
-
3
votes2
answers468
viewsA: Send text via form and transform in link via PHP
<?php /** * Verifica se a url passada existe fazendo uma requisição a ela e caso ela retorne http code 200, significa que ela existe. */ function checkUrl($url) { …
phpanswered Yure Pereira 3,971 -
1
votes1
answer1811
viewsA: Correct way to return the number of results using Codeigniter
The two ways to get the total number of results from the database table then correct, because as much as they are written in different ways they then come to the same end that they were created. But…
-
1
votes2
answers58
viewsA: E-mail with tamplate codeigniter
One way to send email from html template is by using the CI parser class as follows: 1° Creating a view, where it will be the page to be sent by email: <html> <body>…
codeigniteranswered Yure Pereira 3,971 -
1
votes1
answer1385
viewsA: Paging with the codeigniter
Can’t identify the error just by looking at this part of the code in the controller, but possibly the error must be related to the value that the method count_all_results is returning, which should…
-
2
votes1
answer128
viewsA: Creating a Custom Exception from Pdoexception
A simple example, where the Mypdoexception class endeavors to the Pdoexception class, which can then make a custom message when an error occurs using the PDO class. class MyPDOException extends…
-
4
votes4
answers2691
viewsA: Reports with Asp.Net MVC
A library I use is selectpdf, which makes it possible to generate pdf reports from html documents with css styling, making it much easier to format the generated report. It has extensive…
-
1
votes1
answer220
viewsA: Why does the index() method not recognize the [IC] redirect?
Checks in the config/config.php file whether the value of the base_url key of the $config vector is set correctly according to the url of your site/system: //Site local $config['base_url'] =…
-
4
votes2
answers83
viewsA: How to prevent data from being posted to google search?
Use the following HTML meta tag on pages that should not be indexed in search engines: <meta name="robots" content="noindex, nofollow">
-
1
votes3
answers396
viewsA: Why does the php string sometimes return instead of a few accented letters?
This is due to the set of characters your web page is configured to, which is diverging between another set. We currently have the ISO-8859-1 and UTF-8 character sets as the most used, and in PHP we…
-
1
votes2
answers3721
viewsA: Codeigniter - URL friendly
To set up URL friendly in Codeigniter follow the following steps described below. Note: These steps are not necessarily sequential. In the files . /sua_pasta_projeto/application/config/config.php…
-
1
votes4
answers2294
viewsA: How to return an error after sending a form?
You can do this using a GET parameter in the URL: <?php if (isset($_GET['erro']) && $_GET['erro'] == '1') { echo "Deu Erro!"; } ?> <form method="post" id="formulario"…
-
3
votes3
answers13362
viewsA: How to remove whitespace from a text?
The Trim function only removes whitespace that is contained at the beginning and end of the string, i.e., whitespace that will exist inside the string will not be removed. var texto = " Texto a ser…