Posts by denis • 366 points
69 posts
-
0
votes1
answer26
viewsQ: Filter the first result of PHP explodes function and present in a structure
How can I delete the first result from the explode. Converting to array, $separa[0]; I can filter, but with difficulty to eliminate it from the foreach structure. Example: $separa = explode(",",…
-
2
votes1
answer31
viewsQ: Convert comma-divided database field into separate variables with PHP
How can I convert database results that are within a comma-divided field into separate variables regardless of the number of results contained in the field. Example: Have: $row['campo'] =…
-
0
votes2
answers229
viewsA: Unlink command is not working if enabled via include
You need to declare the absolute path of the directory. $delete = "foo/bar/$custom"; unlink($delete);
-
1
votes1
answer118
viewsA: Environment / Technology for developing 3D Web applications
To make the Medusae, was used HTML5 Canvas, Javascript, Procedural GLSL among other techniques. The entire project of Medusae is in the Github. The project images you can find on Flickr To learn…
-
3
votes2
answers161
viewsA: Alternative URL in PHP
Create a file named after .htaccess and put at the root of the site. RewriteEngine on Options +MultiViews #pagina de errro ErrorDocument 404 /404.php RewriteCond %{REQUEST_FILENAME} !-d RewriteCond…
-
1
votes2
answers897
viewsA: phpmailer causes syntax error error, Unexpected T_FUNCTION when hosted
To Locaweb, I usually use this code and works well, if you want to try it: <?php if(@$_POST['acao'] == 'envia'){ $empresa = mysqli_real_escape_string($conexao, $_POST['empresa']); $nome =…
-
-1
votes3
answers603
viewsA: Create/Use shortcodes in php
Create a case structure in a file called shortcodes.php and include via include in the system/site header. Example: <?php //sem linguagem é PT if (!isset($lang)){ $lang="pt"; } switch($lang){…
-
2
votes2
answers226
viewsA: Select checked on return
You can make two queries and make a comparison. <?php $sql="SELECT * FROM tabela WHERE id= $id"; $resultado = $conexao->query($sql); while($row = $resultado->fetch_assoc()) { $st_selected =…
-
1
votes2
answers286
viewsA: GET error in PHP paging
Try this way because PHP_SELF is relative to the document root. Delete the $urlEndereco $url = $_SERVER['PHP_SELF'];
-
-1
votes1
answer8292
viewsA: How to discover the original encoding of a filename (or any string)?
Navigate to the folder and type: file -I meuarquivo.extensao If it is a result from a database, you can use the PHP language to discover the charset using the mb_check_encoding function.…
character-encodinganswered denis 366 -
2
votes1
answer105
viewsA: Picture about the bootstrap slide
You can place the image outside the myCarousel class (just below the closing of the tag), creating another div with the class of botstrap "text-center" to align. Example:…
-
5
votes1
answer286
viewsQ: SQL Injection with PHP + Sqlserver
How can I prevent SQL Injection from input via POST using PHP + Sqlserver. (Using Microsoft SQL Server => mmsql) I’m doing the data abstraction of a comic that runs MYSQLI and in this case is…
-
3
votes2
answers71
viewsQ: Select random with Sqlserver (mssql)
What is the correct way to make an unspecified (random) selection using PHP + Sqlserver, since Microsoft queries do not accept ORDER BY RAND() from MYSQL. Using MYSQLI would be like this: $sql…
-
5
votes2
answers168
viewsQ: Clause similar to Mysql LIMIT in MSSQL
I need to run the query below in PHP with SQL Server, however I cannot use the clause LIMIT absent in darlings microsoft. $SqlTabelaAtual="SELECT * FROM BusinessCadTabPreco RIGHT JOIN…
-
1
votes2
answers6734
viewsA: Change column type of Postegresql Database
ALTER TABLE cadastro_remetente ADD COLUMN "ssl_smtp" BOOLEAN NOT NULL DEFAULT FALSE;
postgresqlanswered denis 366 -
0
votes1
answer121
viewsA: PHP does not recognize all Multiple input files
If you don’t find a solution you can try using Uploadify. Uploadify
-
-1
votes2
answers1200
viewsA: Only get a repeated value in mysql
SELECT cargo FROM `tabela` GROUP BY `tabela`.`cargo` =`cargo`; In this way, I force the results where my field is equal to the field that I intend to bring only one result, but the ideal is to use…
-
3
votes7
answers2227
viewsA: Agile methodologies - a single programmer
I think that Lean is currently the most effective methodology and can apply "alone", that is, if you are the only one involved directly with the client... In these cases can be applied with…
-
-2
votes2
answers325
viewsA: Menu that moves by coordinates
I understand that you need that by clicking on a menu link, you should be directed to the div in a horizontal or vertical animation effect. If so, you can use this example and modify the animation…