你能告诉我如何在godaddy虚拟主机中增加php的执行时间。我在网站文件夹中尝试过.user.ini文件是我的代码
import com.google.appengine.api.datastore.DatastoreService;
import com.google.appengine.api.datastore.DatastoreServiceFactory;
import com.google.appengine.api.datastore.Entity;
String guestbookName = req.getParameter("guestbookName");
Key guestbookKey = KeyFactory.createKey("Guestbook", guestbookName);
String content = req.getParameter("content");
Date date = new Date();
// Place greeting in same entity group as guestbook
Entity greeting = new Entity("Greeting", guestbookKey);
greeting.setProperty("user", user);
greeting.setProperty("date", date);
greeting.setProperty("content", content);
You will then be able to perform a strongly-consistent ancestor query within the entity group identified by the common root entity:
import com.google.appengine.api.datastore.DatastoreService;
import com.google.appengine.api.datastore.DatastoreServiceFactory;
import com.google.appengine.api.datastore.Entity;
DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
Key guestbookKey = KeyFactory.createKey("Guestbook", guestbookName);
Query query = new Query("Greeting", guestbookKey)
.setAncestor(guestbookKey)
.addSort("date", Query.SortDirection.DESCENDING);
List<Entity> greetings = datastore.prepare(query)
.asList(FetchOptions.Builder.withLimit(10));
请你解释如何在godaddy中实现这一点。
答案 0 :(得分:1)
在.htaccess
<IfModule mod_php5.c>
php_value max_execution_time 5000
</IfModule>
或者将它放在PHP脚本的顶部
ini_set('max_execution_time', 5000);
答案 1 :(得分:0)
ini_set('max_execution_time',0);
答案 2 :(得分:0)
通常php.ini位于您的主机文件管理器的主页/。您可以在那里编辑相同的表单,或者如果您无法访问此文件,则可以使用位于特定网站着陆目录中的.htaccess文件。