vingrotajs Posted January 2, 2015 Report 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
qwerty Posted January 2, 2015 Report Posted January 2, 2015 https://www.youtube.com/playlist?list=PL442FA2C127377F07 Dod ziņu, kad noskaties visu. Quote
briedis Posted January 2, 2015 Report Posted January 2, 2015 Bitītmatos, apskaties kas tur ir tajā rindiņā! "uploader.php on line 32" Quote
e-remit Posted January 2, 2015 Report 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
vingrotajs Posted January 2, 2015 Author Report 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
briedis Posted January 2, 2015 Report 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
vingrotajs Posted January 2, 2015 Author Report 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
e-remit Posted January 2, 2015 Report 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
vingrotajs Posted January 2, 2015 Author Report 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
e-remit Posted January 2, 2015 Report 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
vingrotajs Posted January 2, 2015 Author Report 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
e-remit Posted January 2, 2015 Report Posted January 2, 2015 Alternatīva ir - uzlikt jaunāku PHP versiju, vismaz 5.3, tad tas nebūs jāmaina. Quote
ieleja Posted January 2, 2015 Report 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
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.