vingrotajs Posted January 2, 2015 Report Share Posted January 2, 2015 Sveiki! Man ir sanakusi tada problema ,kad es pats nezinu ko lai dara talak,varbut ir kads kas var man palidzet ? Izbeigt sitas mocibas, tik tiesam nezinu ko tas nozime. Parse error: syntax error, unexpected ':' in /home/a9712523/public_html/uploader.php on line 32 Paldies! Quote Link to comment Share on other sites More sharing options...
qwerty Posted January 2, 2015 Report Share Posted January 2, 2015 https://www.youtube.com/playlist?list=PL442FA2C127377F07 Dod ziņu, kad noskaties visu. Quote Link to comment Share on other sites More sharing options...
briedis Posted January 2, 2015 Report Share Posted January 2, 2015 Bitītmatos, apskaties kas tur ir tajā rindiņā! "uploader.php on line 32" Quote Link to comment Share on other sites More sharing options...
e-remit Posted January 2, 2015 Report Share Posted January 2, 2015 (edited) Briedi, tiešām nesaproti, ka 32. rindā ir kols? :D P.S. Vingrotaj, diemžēl daži no foruma dalībniekiem nav gaišreģi un nezina, kas tajā uploader.php failā ir. Nu piedod... Edited January 2, 2015 by e-remit Quote Link to comment Share on other sites More sharing options...
vingrotajs Posted January 2, 2015 Author Report Share Posted January 2, 2015 Vai ir kads kas man var pateikt kas man te tiesi ir janomaina,jo es izmeginaju daudz ko ,bet nekaa nesanaaca :( Parse error: syntax error, unexpected ':' in /home/a9712523/public_html/uploader.php on line 32 biju nomainijis uz : bet neka } $file = $_REQUEST['file'] ?: 'images/'; <----- 32 linija ir seit , bet neko neredzu kas buutu jaizmaina. $allowed = array('gif','png','jpg','JPG','csv'); if($_GET['do'] == 'list') { if (is_dir($file)) { $directory = $file; $result = array(); Quote Link to comment Share on other sites More sharing options...
briedis Posted January 2, 2015 Report Share Posted January 2, 2015 Visdrīzāk tev ir veca php versija un neatbalsta īso ternary pierakstu. Risinājums: $file = $_REQUEST['file'] ? $_REQUEST['file'] : 'images/'; Quote Link to comment Share on other sites More sharing options...
vingrotajs Posted January 2, 2015 Author Report Share Posted January 2, 2015 kad nomainiju uz $file = $_REQUEST['file'] ? $_REQUEST['file'] : 'images/'; man uzmeta Parse error: syntax error, unexpected ':' in /home/a9712523/public_html/uploader.php on line 113 ko man dariit varbuut visu uploader.php failu jums ielikt lai kads vareetu noverst probleemu? } function asBytes($ini_v) { $ini_v = trim($ini_v); $s = array('g'=> 1<<30, 'm' => 1<<20, 'k' => 1<<10); return intval($ini_v) * ($s[strtolower(substr($ini_v,-1))] ?: 1); <---- 113 atrodas seit! } Quote Link to comment Share on other sites More sharing options...
e-remit Posted January 2, 2015 Report Share Posted January 2, 2015 Atbilde ir tieši tā pati, ko es tev teicu PM un pēc tam tev Briedis pateica nedaudz iepriekš! Tu lasi, ko tev raksta ar, vai tikai lipini kopā kodu no gataviem fragmentiem? Quote Link to comment Share on other sites More sharing options...
vingrotajs Posted January 2, 2015 Author Report Share Posted January 2, 2015 Lab izdariju taka e-remit teica iegaaju iegaju codeshare.io un nomainiju uz $file = empty($_REQUEST['file']) ? 'images/' : $_REQUEST['file']; raada to pasu on line 113 http://www.codeshare.io/11lg6<<--- kodu var apstiities seit! Paldies Quote Link to comment Share on other sites More sharing options...
e-remit Posted January 2, 2015 Report Share Posted January 2, 2015 Un ko tev tur tajā 113. rindā dara ternary operator (:?): return intval($ini_v) * ($s[strtolower(substr($ini_v,-1))] ?: 1); ... ja iepriekš jau tika teikts: Visdrīzāk tev ir veca php versija un neatbalsta īso ternary pierakstu. ... un ar koda piemēru tāds jau tika tāds izlabots 32. rindā? Quote Link to comment Share on other sites More sharing options...
vingrotajs Posted January 2, 2015 Author Report Share Posted January 2, 2015 Juus gribat teikt kad ja es to kodu gribu uz iiso versiju mainiit ,tad man visi php faili uz iso versiju jataisa? lai stradaatu ? Quote Link to comment Share on other sites More sharing options...
e-remit Posted January 2, 2015 Report Share Posted January 2, 2015 Alternatīva ir - uzlikt jaunāku PHP versiju, vismaz 5.3, tad tas nebūs jāmaina. Quote Link to comment Share on other sites More sharing options...
ieleja Posted January 2, 2015 Report Share Posted January 2, 2015 tas izskatās pēc '000webhost', kur ir PHP ir 5.2 un "nomainīt" to būs pagrūti Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.