3 Cevap

Bu javascript devre dışı olup olmadığını göstermek için ...... etiketinin bir php dosyası eklemek mümkündür

3 Cevap

Sunucu tarafı PHP kodu Javascript devre dışı olup olmadığını öğrenmek için mümkün değildir.

Bir <noscript> etiketinin içinde PHP kodu koyarsanız, o zaman Javascript olup olmadığını, idam edecek. JavaScript devre dışı değilse Ancak, kodun çıktısı sadece görünür olacaktır.

Sen ayrı bir sayfaya yönlendirmek için Javascript kullanmak isteyebilirsiniz.

Hiçbir JavaScript etkinse bir PHP dosyası eklemek için basit yolu muhtemelen bu olacaktır:

<noscript><iframe src="your_php_file.php"></iframe></noscript>

(Emin değilim kullanmak olmaz eğer kendimi gerçi)

Beni here benim cevap okumanızı öneririz edelim. PHP aslında nasıl çalıştığını açıklar. Tarayıcı Hiç gelmeden PHP kodu koştu.

Bir isteği bu gibi çalışır

Browser Asks for a Webpage

The Web Server Runs the PHP Code
The web server looks through the file that it is about to send to the browser and looks for PHP code. It then interprets the PHP code and makes a page.

The Browser Reads the Output
The browser reads through the HTML and Javascript code that is outputted by the webserver

PHP aslında tarayıcıda koştu asla, bu yüzden Javascript prescence hakkında hiçbir fikri yok.