Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 11:22

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[PHP] Ungewolltes Caching

Discussion on [PHP] Ungewolltes Caching within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
'Ownii's Avatar
 
elite*gold: 0
Join Date: Mar 2011
Posts: 270
Received Thanks: 770
[PHP] Ungewolltes Caching

Heyho ihr super Coder
Ich fange gleich an...
Und zwar habe ich einen Mini CSS Editor gemacht ist ja nichts Großes nun habe ich komischer weise das Problem das er wenn ich das CSS per file_get_contents in die CSS Dateien rein tue den alten CSS kram im Cache speichert..
Ich habe keine Ahnung wieso ob ich einfach nur zu dumm bin oder was weiß ich.
Das ist aber auch nur auf meinem PC so auf Windows Root geht es...
Es wird halt im Cache gespeichert wenn ich per FTP die Datei öffne ist der neue Inhalt drin wenn ich Cache lösche geht es auch wieder... Also es dürfte nicht daran liegen, dass das System nicht funktioniert :O

PHP Code:
    $css file_get_contents('style.css');
    echo 
'<h2>CSS-Editor</h2>';
    if (isset(
$_POST['save'])) {
        
$put file_put_contents('style.css',stripslashes($_POST['css']));
        if (
$put) {
            echo 
'Erfolgreich gespeichert.';
        }
        else {
            echo 
'Es ist ein Fehler aufgetreten.';
        }
    }
    echo 
'<form method="post">';
    echo 
'<textarea name="css"  style="width:100%;min-height:500px;">'.stripslashes($css).'</textarea><br>';
    echo 
'<input type="submit" name="save" value="speichern">';
    echo 
'</form>'
Ihr super Coder wisst doch bestimmt wieso oder?

mfg Ownii
'Ownii is offline  
Thanks
1 User
Old 08/31/2011, 19:30   #2
 
NotEnoughForYou's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 3,407
Received Thanks: 2,024
Meta Tag für no Cache wäre eine Möglichkeit
NotEnoughForYou is offline  
Thanks
2 Users
Old 08/31/2011, 19:36   #3
 
'Ownii's Avatar
 
elite*gold: 0
Join Date: Mar 2011
Posts: 270
Received Thanks: 770
Quote:
Originally Posted by NotEnoughForYou View Post
Meta Tag für no Cache wäre eine Möglichkeit
Klappt vielen Dank!

mfg Ownii
'Ownii is offline  
Old 08/31/2011, 20:19   #4
 
NotEnoughForYou's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 3,407
Received Thanks: 2,024
alternativ wäre auch die mögichkeit mit header falls du in php bleiben willst
NotEnoughForYou is offline  
Thanks
1 User
Old 09/02/2011, 21:01   #5
 
JacK le chilla's Avatar
 
elite*gold: 2
Join Date: May 2011
Posts: 448
Received Thanks: 110
er hats doch schon gelößt aber du könnetst es ja erweitern und dann hier online stellen das man dann seine style.css runterladen kann und noch ne info mit filesize filetype etc nur so zur inspiration
JacK le chilla is offline  
Old 09/02/2011, 21:23   #6
 
NotEnoughForYou's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 3,407
Received Thanks: 2,024
Wollte ihm nur noch ne anderre Möglichkeit offen halten. Sprichst du mich mit der Erweiterung an ? Wäre möglich aber der Sinn erschließt sich mir nicht genau.
NotEnoughForYou is offline  
Reply




All times are GMT +2. The time now is 11:22.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.