Cloud REST API لتعديل جميع صيغ المستندات الشائعة بسرعة في أي نوع من تطبيقات PHP دون تثبيت أي برنامج خارجي.
ابدأ التجربة المجانيةGroupDocs.Editor Cloud SDK لـ PHP يدعم تحرير ومعالجة مجموعة من صيغ ملفات المستندات الشائعة داخل تطبيقات PHP. ما عليك سوى دمج GroupDocs.Editor Cloud SDK لـ PHP مع GroupDocs.Editor Cloud REST API، ثم رفع المستند المدعوم في أي محرر WYSIWYG من الطرف الثالث HTML، ومعالجة المستند وحفظه مرة أخرى بصيغته الأصلية دون إفساد المظهر بعد التحرير. مكتبة محرر PHP تدعم مجموعة متنوعة من صيغ المستندات بما في ذلك Microsoft Word (DOC، DOCX، WordML)، Excel (XLS، XLSX، SpreadsheetML)، العروض التقديمية (PPT، PPTX)، HTML، XML، TXT وOpenDocument.
GroupDocs.Editor Cloud SDK لـ PHP مبنية كطبقة فوق GroupDocs.Editor Cloud REST API التي توفر وقت تطوير قيم من خلال إدارة الطلبات منخفضة المستوى ومعالجة الردود. يمكن للمطورين التركيز على كتابة الكود المحدد فقط حسب الحاجة في المشروع.
تحقق من GroupDocs.Editor Cloud SDK for PHP at GitHub إذا كنت تبحث عن شفرة المصدر لتوضيح الملف في السحابة.
يمكنك تجربة GroupDocs.Editor Low-Code PHP APIs بدون أي قيود.
GroupDocs.Editor Cloud متاح أيضًا كصورة Docker يمكن استخدامها لـ self-host الخدمة. أو يمكنك بناء خدماتك الخاصة باستخدام GroupDocs.Editor High-code APIs التي تُشغِّل حاليًا REST APIs الخاصة بنا.
//Get your App SID, App Key and Storage Name at https://dashboard.groupdocs.cloud (free registration is required).
$AppSid = ""; // Get AppKey and AppSID from https://dashboard.groupdocs.cloud
$AppKey = ""; // Get AppKey and AppSID from https://dashboard.groupdocs.cloud
$configuration = new GroupDocs\Editor\Configuration();
$configuration->setAppSid($AppSid);
$configuration->setAppKey($AppKey);
$editApi = new GroupDocs\Editor\EditApi($configuration);
$fileApi = new GroupDocs\Editor\FileApi($configuration);
// The document already uploaded into the storage
// Load it into editable state
$fileInfo = new Model\FileInfo();
$fileInfo->setFilePath("Spreadsheet/four-sheets.xlsx");
$loadOptions = new Model\SpreadsheetLoadOptions();
$loadOptions->setFileInfo($fileInfo);
$loadOptions->setOutputPath("output");
$loadOptions->setWorksheetIndex(0);
$loadResult = $editApi->load(new Requests\loadRequest($loadOptions));
// Download html document
$htmlFile = $fileApi->downloadFile(new Requests\downloadFileRequest($loadResult->getHtmlPath()));
$html = file_get_contents($htmlFile->getRealPath());
// Edit something...
$html = str_replace("This is sample sheet", "This is sample sheep", $html);
// Upload html back to storage
file_put_contents($htmlFile->getRealPath(), $html);
$uploadRequest = new Requests\uploadFileRequest($loadResult->getHtmlPath(), $htmlFile->getRealPath());
$fileApi->uploadFile($uploadRequest);
// Save html back to xlsx
$saveOptions = new Model\SpreadsheetSaveOptions();
$saveOptions->setFileInfo($fileInfo);
$saveOptions->setOutputPath("output/edited.xlsx");
$saveOptions->setHtmlPath($loadResult->getHtmlPath());
$saveOptions->setResourcesPath($loadResult->getResourcesPath());
$saveResult = $editApi->save(new Requests\saveRequest($saveOptions));
// Done.
echo "Document edited: " . $saveResult->getPath();