我按照此处提到的步骤进行操作https://www.youtube.com/watch?v=9gEPiIoAHo8。
我在这里下载了它的最新稳定版本https://pecl.php.net/package/mongodb,即1.3.4。提取php_mongodb.dll并将其放在ext我的 xampp 目录中。修改php.ini并添加了extension=php_mongodb.dll. 下载了作曲家,但当作曲家安装程序完成工作时,它给了我错误。
我尝试了 x64 TS(我检查了我的 phpinfo 及其线程安全),因为我的笔记本电脑是 64 位,但它给了我一个错误
程序输出:PHP 警告:PHP 启动:无法加载动态库 'C:\xampp\php\ext\php_mongodb.dll' - %1 不是有效的 Win32 应用程序。在第 0 行未知
也尝试了 x84(我知道它不起作用,但我还是尝试了),它给了我一个错误
序号 4694 无法定位在动态链接库 C:\xampp\php\ext\php_mongodb.dll 中
出现上述错误后,又弹出另一个窗口
PHP 启动:无法加载动态库 C:\xampp\php\ext\php_mongodb.dll - 操作系统无法运行 %1
我的 PHP 版本是PHP Version 5.6.3
Xampp版本v3.2.1 Compiled May 7th 2013
我尝试了其他 mongoDB php 驱动程序php_mongo.dll,它工作正常,并且在我执行 php_info 时加载。我想使用 ,php_mongodb.dll因为另一个已经折旧了。
我正在尝试扫描图像中的文本,但如果不使用 S3 存储桶,我无法找到源代码。这是我找到的唯一源代码,但它使用 S3。我在这个项目中使用 python。
https://docs.aws.amazon.com/rekognition/latest/dg/text-detecting-text-procedure.html
import boto3
if __name__ == "__main__":
bucket='bucket'
photo='text.png'
client=boto3.client('rekognition')
response=client.detect_text(Image={'S3Object':{'Bucket':bucket,'Name':photo}})
textDetections=response['TextDetections']
print ('Detected text')
for text in textDetections:
print ('Detected text:' + text['DetectedText'])
print ('Confidence: ' + "{:.2f}".format(text['Confidence']) + "%")
print ('Id: {}'.format(text['Id']))
if 'ParentId' in text:
print ('Parent Id: {}'.format(text['ParentId']))
print ('Type:' + text['Type'])
print
Run Code Online (Sandbox Code Playgroud)
此处找到了我可以在没有 S3 存储桶的情况下使用 Amazon Rekognition 吗?并运行它与我需要的不同,因为它只检测标签。
我正在尝试使链接到另一个视图的 ID 的行值可点击。这是可以实现使用从jQuery的常规数据表中,如前端:<td><h6><a href="/users/{{ $user->id }}">{{ $user->id }}</a></h6></td>。但是我如何使用 yajra 做到这一点?出于某种原因,yajrabox.com 最终无法加载,所以我无法阅读他们的文档。我也找不到相关教程。这是我到目前为止所拥有的。
用户控制器:
public function index()
{
return view('users.index');
}
public function yajraDT()
{
return Datatables::of(User::query())->make(true);
}
Run Code Online (Sandbox Code Playgroud)
index.blade.php:
<div class="container">
<h2>Laravel DataTables Tutorial Example</h2>
<table class="table table-bordered" id="tableDT">
<thead>
<tr>
<th class="text-left">Id</th>
<th class="text-left">First Name</th>
<th class="text-left">Last Name</th>
<th class="text-left">Email</th>
<th class="text-left">Gender</th>
@if(Auth::check() && Auth::user()->type == "Admin")
<th class="text-left">Actions</th>
@endif
</tr>
</thead>
</table>
Run Code Online (Sandbox Code Playgroud)
<script>
$(function() {
$('#tableDT').DataTable({
processing: true,
serverSide: true,
ajax: '{{ url('users/yajraDT') }}',
columns: [
{ data: …Run Code Online (Sandbox Code Playgroud) amazon-s3 ×1
datatables ×1
jquery ×1
laravel ×1
laravel-5.7 ×1
mongodb ×1
php ×1
python ×1
xampp ×1