Neden olabilir, bu benim sunucuda iş ama benim okullar?

2 Cevap php

Ben sadece bir captcha yarattı, ve bu benim kendi sunucusunda mükemmel çalışır. Okulun sunucu üzerinde, bir görüntü oluşturmaz. Neden bu olabilir? Kodunda fark bir çizgidir.

Edit: Başlangıçta, bu çalışma, ama ben yanlışlıkla dizini silindi ve aniden ilk etapta işe yaramadı neden bilmiyorum.

Update: I var_dumped() everything and everything is being set correctly. Source code on school server:

Update: ben bunu anladım! Daha sonra cevap sonrası edeceğiz.

2 Cevap

It is just useless to direct such kind of questions to SO.
There must be thousands of reasons.
And, of course, without access to your server and environment, nobody can say, just by looking into working code.

The only person who can answer this question is you yourself.
With help of your server, of course.
You must ask your server for errors.

ini_set('display_errors',1);
error_reporting(E_ALL);

ama bazen (örneğin ayrıştırma hataları durumunda) bu iş olmaz. Bu durumda. Htaccess ile bu params ayarlamak veya web sunucunun hata günlüğünü kontrol etmek ya var.

Also, you have to do something.
At least add some text output in the script to be sure it being executed.
print out variables using var_dump() to ensure thy contain right values. Add an intentional error to ensure you CAN see them if any. Do something, don't sit watching code!

http://www.ibm.com/developerworks/library/os-debug/: Kendinizi nasıl yardımcı hakkında biraz daha fazla bilgi

GD kütüphanesi okulunuzun sunucusunda etkin olduğundan emin olun.

Ayrıca herhangi bir hata olup olmadığını görmek için komut üstüne bu satırları koyarak deneyin:

ini_set('display_errors', true);
error_reporting(E_ALL);