[英]Code working locally but not on host
我正在網站上。 我正在使用外部類進行一些圖像處理。 它在mamp
服務器上完美運行,但是在主機上我得到了錯誤
Parse error: syntax error, unexpected ':' in
/home/a3526504/public_html/post/src/abeautifulsite/SimpleImage.php on line 251
該行:
$height = $height ?: $width;
服務器正在運行php:5.2
解決方案:我切換了主機。 我以前使用過000webhost,顯然已經死了,他們將其換成了托管人。 他們運行php 5.6。
$height = $height ?: $width;
這僅在php 5.3及更高版本中有效。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.