Neden söyleyerek bir hata "dosya # 4.txt bulmak 291Couldn't" elde tutmak mı?

2 Cevap

Ben sitemde SWFTools kullanabilirsiniz sınamak için bir proje üzerinde çalışıyorum. Ben sadece kullanıcının seçtiği ekranda kaydırma metnini görüntülemek için bu komut dosyası oluşturduk.

Bilmeniz gereken tüm bilgileri aşağıdaki gibidir:

Additional Info that might help you: PHP info version info: PHP 5.2.12 (cli) (built: Dec 16 2009 17:03:10) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

Sunucu: XAMPP (apache, php, mysql, artı bazı diğerleri) Microsoft Windows 7

SwfTools dosyası: swfc.exe

SwfTools sürümü: 0.9.0

My Project is made up of 2 php files: index.php makefile.php

http://ericlounge.host22.com/000/22014/allfiles.zip: Available at Projesi

error: "dosyası # 4.txt bulmak 291Couldn't"

dosyası: /ProjectDirectory/index.php?filename=Test&text=Test+inverted+blend+mode...+ABCDEFGHIJKLMNOPQRSTUVWXYZ&image=1&makeswf=true

SwfTools SWFC belgeler: http:// www.swftools.org / SWFC / swfc.html

2 Cevap

Ben cevabı buldum.

I was using the variable "$file" twice. I set it here:
$file = $_GET["filename"]; and here
$file = fopen($file . ".txt","w");

Bu son denirdi çünkü fopen dosyayı kullanıyordum. Sonunda, bu tamamen yanlış bir dosyayı açtı.

IMO burada olur

else
{
 require("makefile.php");
$file = $_GET["filename"];
$text = $_GET["text"];
$img  = $_GET["image"];
$file = fopen($file . ".txt","w");
echo fwrite($file, createswffile($file, $img, $text));
fclose($file);
system("swfc " . $file . ".txt");

You are trying to open file which doesn't exist. I believe your $file contains 4 as the filename, which later on is used to open file.

$ Dosya değerini yankı-ing deneyin ve göreceksiniz ki onun 4.

Yine, sadece koymak detaya dalış olmadan, kodu ile yağsız.