我使用uploadify进行上传过程.问题是每次上传后锂都会尝试渲染控制器的视图.在我的情况下uploadify.html.php.如何禁用此行为并返回200 OK.
我的控制器代码:
class UploadController extends \app\controllers\AppController {
public function index() {}
public function uploadify() {
Logger::write('info', 'start upload');
if (!empty($this->request->data)) {
$fileData = $this->request->data['Filedata'];
$error = $fileData['error'];
if($error == UPLOAD_ERR_OK) {
// everything ok
$tempFile = $fileData['tmp_name'];
$targetPath = $this->request->env('DOCUMENT_ROOT') . $fileData['folder'] . '/';
$targetFile = str_replace('//','/',$targetPath) . $fileData['name'];
move_uploaded_file($tempFile, $targetFile);
Logger::write('info', 'upload file successfull to ' . $targetFile);
} else if($error == UPLOAD_ERR_INI_SIZE || $error == UPLOAD_ERR_FORM_SIZE) {
// file size to large
Logger::write('error', 'file to large ' …Run Code Online (Sandbox Code Playgroud) 在Android Studio 3.0.1中运行android gradle任务时出现异常。我的项目是使用libgdx构建的。我的桌面gradle任务运行得非常完美。
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':android:validateSigningDebug'.
Run Code Online (Sandbox Code Playgroud)
根本原因在哪里
Caused by: java.lang.SecurityException: class "org.bouncycastle.jcajce.provider.symmetric.IDEA$Mappings"'s signer information does not match signer information of other classes in the same package
Run Code Online (Sandbox Code Playgroud)
我绝对不知道如何解决这个问题。
我试图像链一样使用copyField,但它似乎不起作用.这是我的例子:
<copyField source="allfields" dest="metafields1" />
<copyField source="metafields1" dest="metafields2" />
<copyField source="metafields2" dest="metafields3" />
Run Code Online (Sandbox Code Playgroud)
每个字段使用不同的fieldType.
问题是除了allfields和metafields1之外,另一个在索引之后没有内容.solr无法从另一个copyField复制吗?我使用solr 3.5.
我想路由这样的东西:http: //myapp.com/mycontroller/ ...?x = ...
mycontroller之后的所有东西都是未知的.我不知道路径,我不知道任何参数.路由后,路径和参数应显示为一个变量.
// route in routes.php
Router::connect('/mycontroller/*', 'Mycontroller::index');
// the index function of Mycontroller class
public function index($pathWithParameters) {
print_r($pathWithParameters); // something like: 'hello/world?name=mewel&id=123
}
Run Code Online (Sandbox Code Playgroud)
这可能吗?