Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> $this--> nie działa poprawnie.
omxd
post
Post #1





Grupa: Zarejestrowani
Postów: 135
Pomógł: 0
Dołączył: 18.05.2010

Ostrzeżenie: (0%)
-----


Witam,
nie wiem jak to możliwe ale $this->img działa w funkcji checkimage() ,ale w funkcji prepareImage() wartość $this->img jest pusta.Ktoś ma jakiś pomyśl co się dzieje?
  1. public function __construct($img,$case,$path){
  2. $this->img = $img;
  3. $this->case = $case;
  4. }
  5.  
  6. public function checkImage(){
  7. if($this->img='' || !file_exists($this->img)){
  8.  
  9. return false;
  10. }else {
  11.  
  12. return $this->action = true;
  13. }
  14. }
  15. public function prepareImage(){
  16. echo 'aaaaa';
  17. echo $this->img;
  18. if($this->action != true){
  19. return false;
  20. echo "fffffffff";
  21. } else{
  22. $imageData = getimagesize($this->img);
  23. echo"getimgsize";
  24.  

pozdrawiam
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 1)
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




nie: $this->img=''
a: $this->img==''

Przenosze na przedszkole
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 14.09.2025 - 20:20