php

PHP interaction with jQuery (and JavaScript)

Good afternoon! I started studying web programming relatively recently. During this time, I managed to learn quite well PHP, ... language, explain how to link the jQuery framework or even just pure JavaScript with PHP. I will be grateful for the answer.

Incorrect mb detect encoding detection

You must select the content of the title tag. I process it using the DOM parser. When I save it and open it in the editor, th ... e Lebedev script returns another (and normally formats it in Cyrillic)? How do I convert this text to Cyrillic in this case?

PHP script execution time

How to correctly read the script execution time and output it in the browser?

Convert a php date to the desired format?

The $date variable stores a date of the form, for example, 2014-06-25. How do I convert this date to 25.06.2014?

Date in words in PHP

Good day to all. There are 3 variables in the page: $dd, $mm, $YYYY, which are already equal to the day, month, and year in a ... the day and year in order, it will be very long. Maybe someone has a solution for displaying the date in words? Please share.

How do I compare a date with today's date in a MySQL query?

You need to compare the date with today or another specific date (for example -10 days) in the query itself to make a selecti ... date('Y-m-d',`date`)='".$date."'")); Writes an error: mysql_fetch_array() expects parameter 1 to be resource, boolean given

Changing the encoding when parsing

Here lies the parsing script: The situation is as follows: The site that is parsed, it has UTF8 encoding, and the parsing ... to win1251? Now when inserting a script on the site, it is not clear what is output. I would be very grateful for your help.

Script for converting numbers to different number systems

How do I implement a php script to convert a number from decimal to binary and back?

Nginx + Node.js + phpmyadmin Setup

Good time of day! There was a task to publish the api written in nodejs. On the VPS, nginx + phpmyadmin(mysql) is installed ... } # managed by Certbot listen 80; server_name xxxxxxx.ru www.xxxxxxx.ru; return 404; # managed by Certbot }

How to read wss: / / stream in php without libraries (streaming api vk)

The vk Streaming api allows you to receive events from all over the vk, and this is implemented via the wss: / / protocol. A ... ($socket)) { $context = fgets($socket, 1024); print_r($context); } fclose($socket);

kartik datepicker

Yii2 Bootstrap 4 use kartik\field\FieldRange; use kartik\form\ActiveForm; use kartik\datecontrol\DateControl; ... ct a date, for some reason, the table with the choice simply does not appear (only the edges, as seen in the 2nd screenshot)

vk api, php, sdk

There is a code echo 'ABC\n'; $vk = new VKApiClient(); echo '123\n'; The first echo is output, the second is not, why? There are no errors, the library is connected, the $vk object is not working.

VK API uploading multiple photos to your wall

I have this code,it works with one photo,but how can I upload 5 photos at once? I understand that logically it is necessary t ... t); $image = 'images/test.jpg'; The name of the photo will be given by the vk_id of the user and then delete it.

Bitrix, AJAX, main.feedback sending a form

Created a pop-up feedback form by creating your own component based on main.feedback. Connected it in the footer with the par ... dation(filling in the required fields), no errors are displayed, but the form is simply closed. Maybe someone fixed this bug.

Complex sql query consisting of two tables

Table 1roller id | type_roller | name_file | filepath | time_start | time_stop | period | user_id | tc_servers | timeRolik Ta ... oller_priority user_id == user_id id == roller_id Based on this, glue the priority column to Table 1 and sort Table 1 by it.

Question on sql, is it possible to do this with a single SELECT query?

User Table: users ---------- `id` int(11) `email` varchar(55) `login` varchar(55) And the order table orders -------- `id` i ... to display a list of login's-users who have made more than two orders. is it possible to do this with a single SELECT query ?

Izimodal does not update the information in the window when using ajax

A bit of background: I started using the iziModal library, everything seems to be fine, but there was an incomprehensible cas ... dal.stopLoading(); } }); } }); $("#modal2").iziModal('open'); }; </script>

CORS error when accessing the API on Laravel 7

I wrote a simple API for a home project and uploaded it under the domain api.anaxita.ru , but the following problem occurred ... ccessfully get the code 200. I ask for your advice. The token specified in the request is valid and can be used for requests.

MySQL error: You have an error in your SQL syntax

Recently I had to work with MySQL. I wrote this line in php: $query = "SELECT 'catalog' FROM $moduls WHERE posit = 'head'"; ... ear 'WHERE posit = 'head'' at line 1 I feel that the problem is with quotation marks, can you tell me exactly how to do it?

Word generation algorithm

We need an algorithm for generating random words in English, not necessarily with meaning, the main thing is that these words are easy to read (alternating vowels and consonants)