Skip to content

Tag: php

Set a variable of a class in another class

I have a class address_book in which I want to set $DBConnection using method from another class: Another class: So var_dum should return ‘1’ as it has to be assigned to protected $DBConnection; in the first class. I’m starting my learning of PHP OOP so probably everything is bad. Any way it…

What can do Virus wp-tmp.php on WordPress

I found this virus on My WordPress on wp-includes/ Files that has scan by siteguarding.com and other and found bad scripts ad this content file “wp-tmp.php” : What was this file doing? And how is know that file is insert on my website file root ? I have chating with siteguarding.com support and te…

PHPDoc – typehint a variable to see static methods

I have this code: Is there any way how to typehint in PHPDoc, that variable “$sSomeClass” is a class name, so IDE can see a reference to that class? Answer Well… But I assume $sSomeClass is not a straight assignment like shown? In that case… possibly? IDE wouldn’t be able to dete…

Making Curl to PHP request json rpc

I am trying to connect to Electroneum wallet rpc. The example Curl request is:- Which works perfectly fine on machine side. But when I try PHP like this It returns { “error”: { “code”: -32601, “message”: “Method not found” }, “id”: “0”, &…

List and download clicked file from FTP

I have FTP and I need list all files in FTP in uploads directory and after click on any listed file it will download the specific file from FTP. It list my files in uploads directory but when I will try to download file so it types me “no file” My code: Answer Your link in the generated <a> …