SphereCommunity
Language Crossing - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: General Discussion (/Forum-General-Discussion)
+--- Forum: UO/Sphere Discussion (/Forum-UO-Sphere-Discussion)
+--- Thread: Language Crossing (/Thread-Language-Crossing)



Language Crossing - n1ghtwish - 02-17-2018 01:08 PM

Who else does this on a daily basis?? LolLol

PHP Code:
$dir = new DirectoryIterator($scriptPath);
foreach (
$dir as $file){
    if (
$file->getExtension() == "scp"){
        if (
preg_match("/(points.*?)/i"$file)){
            echo 
"Ignoring $file ... \n";
            continue;
        endif 
// <---------
        
        
echo "Scanning $file ... \n";
        
$fullPath $scriptPath $file;
        
$total += areadefExport($fullPath$file$conn);
    }




RE: Language Crossing - Ben - 02-18-2018 03:10 AM

What are you trying to do?


RE: Language Crossing - n1ghtwish - 02-18-2018 12:56 PM

Oh, that's just a piece of a PHP script I wrote to search .scp files for stuff. I spent a few minutes trying to figure out why PHP was throwing an unexpected string error and then I realized I ended the IF block with "ENDIF" instead of a bracket.


RE: Language Crossing - Ben - 02-19-2018 12:36 AM

Lol now I see. Ya this happens when you play with multiple coding languages.