About 8 results found. (Query 0.29600 seconds)
Programming tools I'm (mostly) a PHP/MySQL programmer, so I'm starting the project in PHP, with support to various databases thanks to PDO object. Because PHP is a well integrated web server language, I think may be easier to make every peers also a “reseeder” for people without this project installed (so via peers web interface).
You still validate types, constrain formats, and most importantly run the database account with least privilege so if injection lands, the damage surface is strangled instead of catastrophic. In PHP, the old mysql_ functions are dead. Use PDO with prepared statements. Never concatenate variables into the query string. PHP // Disable emulation. $ pdo -> setAttribute ( PDO :: ATTR_EMULATE_PREPARES , false ) ; $ stmt = $ pdo -> prepare ( "...
Системні залежності apt install composer php-fpm php-curl php-dom php-sqlite3\ php-fileinfo php-gd php-json php-mbstring\ php-openssl php-pdo php-tokenizer php-zip php-session в apt має вискочити нотайс з пропозицією поставити php-common , тому php-dom , php-fileinfo здається можна випиляти зі списку, але я залишу цю команду з історії bash, як вона є.
{{LinuxConsole| {{Color|0A0|[root@host]#}} yum install php php-pear php-common php-gd php-devel php-mbstring php-pear-Mail php-cli php-imap php-snmp php-pdo php-xml php-ldap php-pear-Net-SMTP php-mysql {{Color|0A0|[root@host]#}} yum install spawn-fcgi <nowiki># Затем в /etc/init.d/ создаём стартовый скрипт модуля:</nowiki> {{Color|0A0|[root@host]#}} vim /etc/init.d/php_cgi }} В него добавим следующее: <pre> #!
В частности, для YGGtracker будет использоваться адрес вида http://[IP]/yggtracker Устанавливаем зависимости: apt install nginx memcached php-fpm php-memcached php-mysql php-pdo php-curl Поскольку работа с DNS не подразумевается, редактируем стандартный файл настроек, предварительно создав его резервную копию: cp /etc/nginx/sites-available/default /etc/nginx/sites-available/default.bak nano /etc/nginx/sites-available/default Актуальный пример содержимого также доступен в файле...
empty ( $threads )) { $generateThread = array_map ( function ( $thread ) use ( $db ) { $generate = " \n\t\t\t\t <div id= \" thread- { $thread [ 'id' ] } \" class= \" thread-container \" >" . generateThread ( $thread ); $stmt = $db -> prepare ( "SELECT * FROM posts WHERE parent = :threadId AND status = 0 ORDER BY id DESC LIMIT 3" ); $stmt -> execute ([ 'threadId' => $thread [ 'id' ]]); $replies = array_reverse ( $stmt -> fetchAll ( PDO :: FETCH_ASSOC )); $omittedReplies = countReplies (...
No information is available for this page.
No information is available for this page.