Questions tagged as 'php'

1
answer

Is it possible to access a static attribute without using self :: or ClassName :: in object-oriented PHP?

Having the following class called Pagina : class Pagina { public $_nombre = "Bienvido a tu casa"; public static $_url ="tucasa.com"; public function bienvenida() { echo $this->...
asked by 07.06.2017 / 15:25
1
answer

why some files do not redirect? [closed]

Install the copy of a web system on a new server with its respective database. When doing tests I realize that some files do not direct me to what should be or redirect themselves. Do not change any code ... Why does this happen?     
asked by 26.05.2017 / 16:07
2
answers

Php or Apache autoreference of the server without using ip public

Hello, I am trying to reference by header("Location: http://127.0.0.1:8086") to the same server but different port without using the public ip because only port 80 I have it published for security reasons because the application of port 8...
asked by 07.06.2017 / 13:10
1
answer

Use of Callback without anonymous function in php?

I'm looking for how to do a callback function that does not pass as an anonymous function callback but an already declared function. I understand that to call a callback I can do it this way private function create($callback) { //a...
asked by 19.10.2017 / 14:47
2
answers

Problems with autoload in php

Colleagues I have the following question, it turns out that I am working with mvc without a framework, and I have problems with autoload gives me the following error    Fatal error: Uncaught Error: Class 'Model \ ProjectModel' not found in...
asked by 19.10.2017 / 18:09
1
answer

Help with html2pdf

Good afternoon I need help with the html2pdf, I want to automatically fill some fields of the document but doing tests and I do not detect the variables, This is the one that shows the data in the pdf <!DOCTYPE HTML> <?php sessi...
asked by 19.10.2017 / 17:03
2
answers

Compare positions of an array $ miarray [n]

How could I validate the values of the same array, that is, for example: if ($miarray[0] < $miarray[1]) { //$miarray[0] toma el valor de $miarray[1] } if ($miarray[2] > $miarray[3]) { //$miarray[3] toma el valor de $miarray[2] }...
asked by 16.05.2017 / 14:58
1
answer

Allow special characters in htaccess

How can I allow special characters in htaccess? I'm using: RewriteRule ^Juegos/Xbox-One/([0-9]+)/([0-9a-zA-Z_-]+)/ single.php?ID=$1 [L] However, letters like the ñ or accented words make the URL not work. I'm also having a problem with that...
asked by 31.05.2017 / 17:40
1
answer

Pass data from localstorage to php

I need to pass a data of localstorage to a variable php , and I store the data in a script on the same page but I get null to php , I do not know what I'm doing wrong or what I'm missing, I attach my code, thanks in advance for...
asked by 01.06.2017 / 14:48
1
answer

sale price of woocommerce have any value and that is not less than the regular price

I want to change the value of "sale price" of the products so that I do not get an error when I put it higher than the "Regular price", how could I do this? Using PHP in the woocommerce code or installing a plugin? I've been looking at...
asked by 31.05.2017 / 15:42